[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

closing DialogBox in FXRuby

Mateusz Winiarski

9/5/2008 6:25:00 PM

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.

1 Answer

Lyle Johnson

9/5/2008 10:02:00 PM

0

On Fri, Sep 5, 2008 at 1:24 PM, MAwiniarski <MAwiniarski@gmail.com> 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