Test for wxPyTipProvider

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2002-07-21 02:57:38 +00:00
parent cf27687318
commit 861a0196f9

View File

@ -209,6 +209,10 @@ class MyLog(wxPyLog):
self.tc.AppendText(message + '\n')
class MyTP(wxPyTipProvider):
def GetTip(self):
return "This is my tip"
#---------------------------------------------------------------------------
def opj(path):
@ -545,6 +549,7 @@ class wxPythonDemo(wxFrame):
showTip, index = (1, 0)
if showTip:
tp = wxCreateFileTipProvider(opj("data/tips.txt"), index)
##tp = MyTP(0)
showTip = wxShowTip(self, tp)
index = tp.GetCurrentTip()
open(opj("data/showTips"), "w").write(str( (showTip, index) ))