0

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 ?

Raptor
  • 53,206
  • 45
  • 230
  • 366

1 Answers1

3

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.

Martin Wittemann
  • 2,109
  • 1
  • 12
  • 14
  • @MartinWittermann thanks for answering my question again. But how to listen instead of execute to click ? I thought my code was listening . – Raptor May 24 '13 at 06:04
  • 1
    Read '...listen instead of "execute" to "click" ...' - meaning the event name. – ThomasH May 24 '13 at 10:29