closing DialogBox in FXRuby

M

MAwiniarski

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,
:eek:pts => 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.
 
L

Lyle Johnson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top