ImageButton & DrawableButton


#1

Hi,

I’m a bit puzzled by the graphical button classes:

  • DrawableButton::setImages takes eight drawables (normal, over, down, disabled, normalOn, overOn, downOn, disabledOn) and honors the toggleState of the button in its drawing code.

  • ImageButton::setImages takes three images (over, down & normal), plus extra overlay parameters, and does not honor the toggleState of the button in the drawing code.

Is there a simple way, other than subclassing ImageButton to get an image button that displays visual feedback when its toggleState changes?

Thanks.


#2

You could create a DrawableButton with some DrawableImage objects?..


#3

Yes, well…

I kinda liked ImageButton simplicity…

I really don’t need eight abstract images and an AffineTransform in my case …

ImageButton does precisely what I need, except that it doesn’t show a different image when toggled.

Thanks anyway :slight_smile:


#4