Raptor
Raptor

Reputation: 54248

onClick ( execute ) event of qx.ui.basic.Image?

Is there any onClick (execute) of qx.ui.basic.Image ?

var myImage = new qx.ui.basic.Image("myApp/image.png");
myImage.addListener("execute", function(e) {
  // some action
});

Qooxdoo prompts an error:

There is no event handler for the event 'execute' on target

Is it a must to use a qx.ui.basic.Button with Image ?

Upvotes: 0

Views: 341

Answers (1)

Martin Wittemann
Martin Wittemann

Reputation: 2115

It depends on what you want. If you want all the stuff like focusable and keyboard accessable, you have to make it a button. Still, you can easily remove the look of the button in the theme or by setting the decorator to null. If you don't need all that and only want a click event, you can listen instead of execute to click which will work as expected on images as well.

Upvotes: 3

Related Questions