[fxruby-users] dialog.execute vs dialog.show
H.Worby at Kinsey.Com
Mon Mar 21 11:04:51 EST 2005
From: Lyle Johnson [mailto:lyle at knology.net]
Sent: Monday, March 21, 2005 8:18 AM
To: Harold Worby
Cc: fxruby-users at rubyforge.org
Subject: Re: [fxruby-users] dialog.execute vs dialog.show
>> I tried to use FXEvent.win_y in the trees event code to get the
>> of the event (close enough) but get a runtime error:
>> 'undefined method `win_y' for Fox::FXEvent:Class (NoMethodError)'
>FXEvent#win_y is an instance method, not a class method. That is, you
>need to have an FXEvent object lying around and call its win_y() method
>to get the y-coordinate.
How would one create FXEvent object that references a widgets events? I
tree= FXTreeList.new(@group1, 0, nil, 0,...)
tree.connect(SEL_CLICKED ) do |sender, selector, ptr|
itemselect(sender, selector, ptr,y)
How would you declare the myFXEvent object. As part is the application,
the widget, or in the event routine?
>> Lastly in this code I try to set the FXTextField target to be it's
>> dialog window and send a FXDialogBox::ID_CANCEL when it is ckicked to
>> the dialog. Why doesn't this work?
>I don't think I understand this at all. You're creating a dialog box
>that contains a text field (which is used to allow the user to enter
>and edit a line of text), but you want the dialog box to close as soon
>as the user clicks inside that text field?
The idea is when the user to clicks on a leaf item a read only text box
appears over the top of it displaying more detailed information about
the item. Then when the user clicks again the text box goes away.
I now have updated to v1.5.
Thanks for the help.
More information about the fxruby-users