]> git.saurik.com Git - wxWidgets.git/commitdiff
Test for wxPyTipProvider
authorRobin Dunn <robin@alldunn.com>
Sun, 21 Jul 2002 02:57:38 +0000 (02:57 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 21 Jul 2002 02:57:38 +0000 (02:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/Main.py

index ffdb8be6d95634be64b527663f039a89c6c59acd..d7fc3a4fd3f4c7e9d1020f7c59c9a6f7398fe149 100644 (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) ))