Hi Henik-Jan I did not even know that there was something called a MDI-Frame! But have you tried showModal? The showModal function[1] has worked for me in the past. See samples/wx/TimeFlowsEx.hs in the wxHaskell source repository for an (longish) example. Search, in the TimeFlowEx example, for "showModal" to find the relevant code.
Greetings, Mads [1] http://hackage.haskell.org/packages/archive/wx/0.10.1/doc/html/Graphics-UI-WX-Dialogs.html#v%3AshowModal Henk-Jan van Tuyl wrote: > I want to create a modal window[1] to ask the user confirmation after > selecting a certain menu option; I tried creating a child window, the > application froze after closing the child. The code is as follows: > > > askConfirmation :: MDIParentFrame a -> IO Bool askConfirmation > > parent = do > > result <- varCreate False > > confirmationWindow result parent varGet result > > > > confirmationWindow :: Var Bool -> MDIParentFrame a -> IO () > > confirmationWindow result parent = > > do > > f <- mdiChildFrame parent [ text := "Confirmation", fontSize := > > 15 ] > > yes <- button f [ text := "Yes", on command := varSet result > > True >> close f] > > no <- button f [ text := "No", on command := varSet result > > False >> close f] > > WXCore.frameCenter f > > set f [ layout := column 1 [ label "Are you sure?" > > , WXCore.row 10 [ widget yes, widget no ] > > ] > > ] > > > How can I do this correctly? > > > [1] http://en.wikipedia.org/wiki/Modal_window >
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects
_______________________________________________ wxhaskell-devel mailing list wxhaskell-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel