Closing DialogBox in FXRuby

Greetings,

I’ve got opened MainWindow and DialogBox in which I want to manipulate
some data, using entry form and methods.

How to close DialogBox to return to MainWindow not using standard “OK”
“Cancel” buttons ?

The code is:

@bChangeProfile = FXButton.new(@vFrame2, “Change”, nil, nil, 0,
:opts => LAYOUT_CENTER_X | LAYOUT_BOTTOM |
LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT | BUTTON_NORMAL,
:height => 25).connect(SEL_COMMAND) do |sender, selector, data|

 # checkPassword(

getSelectedLogin)
# if checkPrassword returns true DialogBox should close and
return to MainWindow
# if returns false should stay in DialogBox

end

Thanks.

On Fri, Sep 5, 2008 at 1:24 PM, MAwiniarski [email protected]
wrote:

I’ve got opened MainWindow and DialogBox in which I want to manipulate
some data, using entry form and methods.

How to close DialogBox to return to MainWindow not using standard “OK”
“Cancel” buttons ?

Something like this should work:

getApp().stopModal(dialogBox, true)
dialogBox.hide

Hope this helps,

Lyle