[fxruby-users] FXImageFrame/SEL_LEFTBUTTONRELEASE
Lyle Johnson
lyle at lylejohnson.name
Wed Apr 2 12:43:48 EDT 2008
On Mar 25, 2008, at 2:46 PM, Mathijs C wrote:
> I have a FXImageFrame widget and I would like it to show another
> image when
> I click on it.
>
> I'm having no luck with receiving a onclick via SEL_LEFTBUTTONRELEASE.
>
> ...
>
> imageframe=FXImageFrame.new(mainwindow,the_image,LAYOUT_EXPLICIT,
> 0,0,20,20)
> imageframe.connect(SEL_LEFTBUTTONRELEASE) {p 'onclick received'}
> ...
>
> What is it that I'm missing?
Sorry for the delayed response; I didn't notice your message when it
first came across the list. All that's missing is that you need to
call enable() on the imageframe before it will start sending out
messages:
imageframe.enable
By default, some widgets (like FXLabel, or FXImageFrame) don't forward
their messages to their targets.
Hope this helps,
Lyle
---
"FXRuby: Create Lean and Mean GUIs with Ruby"
Now available as a Beta book from the Pragmatic Bookshelf
http://www.pragprog.com/titles/fxruby
More information about the fxruby-users
mailing list