'wxImageFromStream',
'RowColSizer',
'Unicode',
+ 'wxFileHistory',
]),
('Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame',
'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE',
'wxDragImage', "wxProcess", "FancyText", "OOR", "wxWave",
'wxJoystick', 'DrawXXXList', 'ErrorDialogs', 'wxMimeTypesManager',
- 'ContextHelp', 'SplitTree', 'Unicode',
+ 'ContextHelp', 'SplitTree', 'Unicode', 'wxFileHistory',
]),
('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
self.otherWin = None
+ self.showTip = true
EVT_IDLE(self, self.OnIdle)
EVT_CLOSE(self, self.OnCloseWindow)
EVT_ICONIZE(self, self.OnIconfiy)
# Set up a log on the View Log Notebook page
self.log = wxTextCtrl(splitter2, -1,
style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
+
# Set the wxWindows log target to be this textctrl
#wxLog_SetActiveTarget(wxLogTextCtrl(self.log))
+
+ # But instead of the above we want to show how to use our own wxLog class
wxLog_SetActiveTarget(MyLog(self.log))
self.window = self.otherWin
self.otherWin = None
+ if self.showTip:
+ self.ShowTip()
+ self.showTip = false
+
+
+ #---------------------------------------------
+ def ShowTip(self):
+ try:
+ showTipText = open(opj("data/showTips")).read()
+ showTip, index = eval(showTipText)
+ except IOError:
+ showTip, index = (1, 0)
+ if showTip:
+ tp = wxCreateFileTipProvider(opj("data/tips.txt"), index)
+ showTip = wxShowTip(self, tp)
+ index = tp.GetCurrentTip()
+ open(opj("data/showTips"), "w").write(str( (showTip, index) ))
+
+
#---------------------------------------------
def OnDemoMenu(self, event):
try:
def OnClose(self, evt):
frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)")
frame.Show(true)
- self.ShowTip(frame)
- self.Destroy()
-
- def ShowTip(self, frame):
- try:
- showTipText = open(opj("data/showTips")).read()
- showTip, index = eval(showTipText)
- except IOError:
- showTip, index = (1, 0)
- if showTip:
- tp = wxCreateFileTipProvider(opj("data/tips.txt"), index)
- showTip = wxShowTip(frame, tp)
- index = tp.GetCurrentTip()
- open(opj("data/showTips"), "w").write(str( (showTip, index) ))
-
+ evt.Skip() # Make sure the default handler runs too...
class MyApp(wxApp):
wxInitAllImageHandlers()
splash = MySplashScreen()
splash.Show()
- wxYield()
return true