Question

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 ?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top