X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..a92b0cfd2bd0bef75b43c071df0b0e028f360d8e:/wxPython/demo/wxMiniFrame.py diff --git a/wxPython/demo/wxMiniFrame.py b/wxPython/demo/wxMiniFrame.py index f3cd53a40a..2e947486e8 100644 --- a/wxPython/demo/wxMiniFrame.py +++ b/wxPython/demo/wxMiniFrame.py @@ -3,13 +3,14 @@ from wxPython.wx import * #--------------------------------------------------------------------------- class MyMiniFrame(wxMiniFrame): - def __init__(self, parent, ID, title, pos, size, style): - wxMiniFrame.__init__(self, parent, ID, title, pos, size, style) + def __init__(self, parent, title, pos=wxDefaultPosition, size=wxDefaultSize, + style=wxDEFAULT_FRAME_STYLE ): + wxMiniFrame.__init__(self, parent, -1, title, pos, size, style) panel = wxPanel(self, -1) - button = wxButton(panel, 1003, "Close Me") + button = wxButton(panel, -1, "Close Me") button.SetPosition(wxPoint(15, 15)) - EVT_BUTTON(self, 1003, self.OnCloseMe) + EVT_BUTTON(self, button.GetId(), self.OnCloseMe) EVT_CLOSE(self, self.OnCloseWindow) def OnCloseMe(self, event): @@ -21,9 +22,11 @@ class MyMiniFrame(wxMiniFrame): #--------------------------------------------------------------------------- def runTest(frame, nb, log): - win = MyMiniFrame(frame, -1, "This is a wxMiniFrame", - wxDefaultPosition, wxSize(200, 200), - wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ) + win = MyMiniFrame(frame, "This is a wxMiniFrame", + #pos=(250,250), size=(200,200), + style=wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ) + win.SetSize((200, 200)) + win.CenterOnParent(wxBOTH) frame.otherWin = win win.Show(true)