-class MyMiniFrame(wxMiniFrame):
- def __init__(self, parent, ID, title, pos, size, style):
- wxMiniFrame.__init__(self, parent, ID, title, pos, size, style)
- panel = wxPanel(self, -1)
- ID = NewId()
- button = wxButton(panel, ID, "Close Me")
- button.SetPosition(wxPoint(15, 15))
- self.Connect(ID, -1, wxEVT_COMMAND_BUTTON_CLICKED, self.OnCloseMe)
-
- def OnCloseMe(self, event):
- self.Close(true)
-
- def OnCloseWindow(self, event):
- self.Destroy()
+if wxPlatform == '__WXMSW__':
+ class MyMiniFrame(wxMiniFrame):
+ def __init__(self, parent, ID, title, pos, size, style):
+ wxMiniFrame.__init__(self, parent, ID, title, pos, size, style)
+ panel = wxPanel(self, -1)
+ ID = NewId()
+ button = wxButton(panel, ID, "Close Me")
+ button.SetPosition(wxPoint(15, 15))
+ self.Connect(ID, -1, wxEVT_COMMAND_BUTTON_CLICKED, self.OnCloseMe)
+
+ def OnCloseMe(self, event):
+ self.Close(true)
+
+ def OnCloseWindow(self, event):
+ self.Destroy()