Dialog Resize

Using the following code, I can't get my dialog to resize. from wxPython.wx import *
class MyApp(wxApp):
    def OnInit(self):
        frame = wxFrame(NULL, -1, "testing")
        frame.Show(true)
        pre = wxPreDialog()
        pre.SetExtraStyle(wxRESIZE_BORDER)
        pre.Create(frame, -1, "testing",size=(450,300))
        pre.ShowModal()
        pre.Destroy()
        frame.Close()
        frame.Destroy()
        return true

myapp = MyApp(0)
myapp.MainLoop()

Any help would be appreciated.

Thanks
Ryan

Ryan Scott wrote:

Using the following code, I can't get my dialog to resize.

You're trying too hard. This works:

from wxPython.wx import *

class MyApp(wxApp):
    def OnInit(self):
        frame = wxFrame(NULL, -1, "testing")
        frame.Show(true)
        dlg = wxDialog(frame, -1, "testing dialog", size=(450,300),
                       style=wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
        dlg.ShowModal()
        dlg.Destroy()

        frame.Close()
        return true

myapp = MyApp(0)
myapp.MainLoop()

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!