]>
Commit | Line | Data |
---|---|---|
cf694132 RD |
1 | |
2 | from wxPython.wx import * | |
3 | ||
4 | #--------------------------------------------------------------------------- | |
5 | class MyMiniFrame(wxMiniFrame): | |
a9fd2e6f RD |
6 | def __init__(self, parent, title, pos=wxDefaultPosition, size=wxDefaultSize, |
7 | style=wxDEFAULT_FRAME_STYLE ): | |
8 | wxMiniFrame.__init__(self, parent, -1, title, pos, size, style) | |
cf694132 RD |
9 | panel = wxPanel(self, -1) |
10 | ||
a9fd2e6f | 11 | button = wxButton(panel, -1, "Close Me") |
cf694132 | 12 | button.SetPosition(wxPoint(15, 15)) |
a9fd2e6f | 13 | EVT_BUTTON(self, button.GetId(), self.OnCloseMe) |
f6bcfd97 | 14 | EVT_CLOSE(self, self.OnCloseWindow) |
cf694132 RD |
15 | |
16 | def OnCloseMe(self, event): | |
1e4a197e | 17 | self.Close(True) |
cf694132 RD |
18 | |
19 | def OnCloseWindow(self, event): | |
1e4a197e | 20 | print "OnCloseWindow" |
cf694132 RD |
21 | self.Destroy() |
22 | ||
23 | #--------------------------------------------------------------------------- | |
24 | ||
25 | def runTest(frame, nb, log): | |
6bff4be5 | 26 | win = MyMiniFrame(frame, "This is a wxMiniFrame", |
a9fd2e6f RD |
27 | #pos=(250,250), size=(200,200), |
28 | style=wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ) | |
6bff4be5 RD |
29 | win.SetSize((200, 200)) |
30 | win.CenterOnParent(wxBOTH) | |
cf694132 | 31 | frame.otherWin = win |
1e4a197e | 32 | win.Show(True) |
cf694132 RD |
33 | |
34 | ||
35 | #--------------------------------------------------------------------------- | |
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | ||
44 | ||
45 | ||
46 | overview = """\ | |
47 | """ |