Demo cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3,13 +3,14 @@ from wxPython.wx import *
|
|||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
class MyMiniFrame(wxMiniFrame):
|
class MyMiniFrame(wxMiniFrame):
|
||||||
def __init__(self, parent, title, style):
|
def __init__(self, parent, title, pos=wxDefaultPosition, size=wxDefaultSize,
|
||||||
wxMiniFrame.__init__(self, parent, -1, title, style=style)
|
style=wxDEFAULT_FRAME_STYLE ):
|
||||||
|
wxMiniFrame.__init__(self, parent, -1, title, pos, size, style)
|
||||||
panel = wxPanel(self, -1)
|
panel = wxPanel(self, -1)
|
||||||
|
|
||||||
button = wxButton(panel, 1003, "Close Me")
|
button = wxButton(panel, -1, "Close Me")
|
||||||
button.SetPosition(wxPoint(15, 15))
|
button.SetPosition(wxPoint(15, 15))
|
||||||
EVT_BUTTON(self, 1003, self.OnCloseMe)
|
EVT_BUTTON(self, button.GetId(), self.OnCloseMe)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
EVT_CLOSE(self, self.OnCloseWindow)
|
||||||
|
|
||||||
def OnCloseMe(self, event):
|
def OnCloseMe(self, event):
|
||||||
@@ -22,7 +23,8 @@ class MyMiniFrame(wxMiniFrame):
|
|||||||
|
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
win = MyMiniFrame(frame, "This is a wxMiniFrame",
|
win = MyMiniFrame(frame, "This is a wxMiniFrame",
|
||||||
wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ)
|
#pos=(250,250), size=(200,200),
|
||||||
|
style=wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ)
|
||||||
win.SetSize((200, 200))
|
win.SetSize((200, 200))
|
||||||
win.CenterOnParent(wxBOTH)
|
win.CenterOnParent(wxBOTH)
|
||||||
frame.otherWin = win
|
frame.otherWin = win
|
||||||
|
Reference in New Issue
Block a user