X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96bfd05319f9e393843e84ca5274d85ff248bad4..429ef4bceaceb7b049396f795178d7072f027f62:/wxPython/demo/wxFloatBar.py diff --git a/wxPython/demo/wxFloatBar.py b/wxPython/demo/wxFloatBar.py index ad3057584e..1daf702276 100644 --- a/wxPython/demo/wxFloatBar.py +++ b/wxPython/demo/wxFloatBar.py @@ -41,8 +41,7 @@ class TestFloatBar(wxFrame): tb.AddSeparator() - tb.AddTool(60, images.getTog1Bitmap(), images.getTog2Bitmap(), - shortHelpString="Toggle with 2 bitmaps", isToggle=true) + tb.AddCheckTool(60, images.getTog1Bitmap(), images.getTog2Bitmap()) EVT_TOOL(self, 60, self.OnToolClick) EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick) tb.Realize() @@ -65,22 +64,22 @@ class TestFloatBar(wxFrame): def OnToolRClick(self, event): self.log.WriteText("tool %s right-clicked\n" % event.GetId()) - # def test(self, event): - # self.log.WriteText("Button clicked!") #--------------------------------------------------------------------------- def runTest(frame, nb, log): win = TestFloatBar(frame, log) frame.otherWin = win - win.Show(true) + win.Show(True) #--------------------------------------------------------------------------- overview = """\ -wxFloatBar is a subclass of wxToolBar, implemented in Python, which can be detached from its frame. +wxFloatBar is a subclass of wxToolBar, implemented in Python, which +can be detached from its frame. -Drag the toolbar with the mouse to make it float, and drag it back, or close it to make the toolbar return to its original position. +Drag the toolbar with the mouse to make it float, and drag it back, or +close it to make the toolbar return to its original position. """ @@ -90,6 +89,13 @@ Drag the toolbar with the mouse to make it float, and drag it back, or close it +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) + + +