[fxruby-users] FXDialogBox - how to close
Frederick Schaeffer
rschaeff at comcast.net
Mon Apr 27 10:21:20 EDT 2009
That WORKS!!!!! Thank you SOOOOOO much!! It never occurred to me to look
in the FXApp class!!
Rick Schaeffer
-----Original Message-----
From: fxruby-users-bounces at rubyforge.org
[mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Philippe Lang
Sent: Sunday, April 26, 2009 10:55 PM
To: fxruby-users at rubyforge.org
Subject: Re: [fxruby-users] FXDialogBox - how to close
fxruby-users-bounces at rubyforge.org wrote:
> I have an FXDialogBox that I want to programmatically close. I have
> been unable to figure out how to do it and am baffled!
>
> If I add an "Accept" button using this code:
>
> accept = FXButton.new(buttons, "&Accept", nil, self, ID_ACCEPT,
> FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
>
> the dialog exits properly when I hit the button. BUT...I don't want
> to have a button in the dialog. When the user selects an item from a
> listbox, I just want to do the same thing as "Accept". I have tried
> having the dialog close itself. The window closes but the parent
> window thinks it still exists (The dialog is "modal"). Nothing I
> have tried closes the dialog box and lets the parent window function
> normally.
Hi,
Maybe you can try this:
# Closes the dialog.
def closeDialog
close
$app.stopModal
end
... where $app is your application object.
Best regards,
Philippe Lang
Attik System
_______________________________________________
fxruby-users mailing list
fxruby-users at rubyforge.org
http://rubyforge.org/mailman/listinfo/fxruby-users
More information about the fxruby-users
mailing list