Vladimir Konrad
2008-Jan-12 12:29 UTC
[fxruby-users] Is there a way to handle window (FXDialogBox) "close event" (or any other event/message)?
I cannot figure out how to call a function (or have a block executed) when a FXDialogBox closes (to have some program variables set from the text-fields in the dialog). Also, how do I close the dialog box when user presses Enter in some text-field, I know how to handle Enter key-press but not how to send message to the FXDialogBox window). Vlad PS: I searched and tried but still failing. Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm
Vladimir Konrad
2008-Jan-12 14:16 UTC
[fxruby-users] (parially figured it out) Is there a way to handle window (FXDialogBox) "close event" (or any other event/message)?
> Also, how do I close the dialog box when user presses Enter in some > text-field, I know how to handle Enter key-press but not how to send > message to the FXDialogBox window).used, .handle method Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm
Lyle Johnson
2008-Jan-12 20:19 UTC
[fxruby-users] Is there a way to handle window (FXDialogBox) "close event" (or any other event/message)?
On Jan 12, 2008, at 6:29 AM, Vladimir Konrad wrote:> I cannot figure out how to call a function (or have a block executed) > when a FXDialogBox closes (to have some program variables set from the > text-fields in the dialog).It depends on how the dialog box closes. Usually, you would use a pattern like the following: dialog = FXFileDialog.new(...) # or some other kind of dialog box # # ... add code here to initialize the text fields in the dialog box equal to program variables... # if dialog.execute != 0 # # ... add code here to set the program variables based on the new values of the text fields... end Hope this helps, Lyle
Vladimir Konrad
2008-Jan-14 10:57 UTC
[fxruby-users] [solved] Is there a way to handle window (FXDialogBox) "close event" ?
> It depends on how the dialog box closes. Usually, you would use a > pattern like the following: > > dialog = FXFileDialog.new(...) # or some other kind of dialog > box # > # ... add code here to initialize the text fields in the > dialog box equal to program variables... > # > if dialog.execute != 0 > # > # ... add code here to set the program variables > based on the new values of the text fields... > end > > Hope this helps,Thank you. Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm