On Jan 6, 2007, at 4:47 AM, Dr R.J.Appleton wrote:

> I have designed a dialog using the class designer, and am wanting  
> to use
> it as a modal dialog from my app wizard created application.
>
> I have the following lines to create the dialog:
>
>              frm = dabo.ui.createForm(filename)
>              frm.Parent = app.MainForm
>              frm.showModal()
>
> Unfortunately there are the following issues:
> 1) the dialog has its own copy of the DABO menus (it should have no  
> menu
> bar)

        To suppress a menu bar, in the form's initProperties method you can  
either set the form's MenuBarClass to None, or set ShowMenuBar to False.

> 2) it does not block the main application

        This is a shortcoming of wxPython. It has a MakeModal() method that  
is supposed to do what its name implies, but it doesn't work.  
According to Robin Dunn, the only way to get a modal window is to use  
wx.Dialog, not wx.Frame.

        We have plans to re-factor the form/dialog classes to make it  
possible to instantiate the correct class on the fly, but it is not a  
trivial matter to do so. Until then, you have to use dDialog or one  
of its subclasses to create a modal form.

        I should also note that I have tried to incorporate the dDialog  
classes into the Class Designer with mixed results. Currently you can  
only create dialogs in code.


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to