X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/299647acac7960652aadb008775429c1f8ea9b8d..51ba037fa8891066572ff367577770e234089dc0:/wxPython/demo/Button.py?ds=sidebyside diff --git a/wxPython/demo/Button.py b/wxPython/demo/Button.py index 039ff89e4b..75e5893785 100644 --- a/wxPython/demo/Button.py +++ b/wxPython/demo/Button.py @@ -1,7 +1,3 @@ -# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net) -# -# o Updated for wx namespace -# import wx import images @@ -42,9 +38,15 @@ class TestPanel(wx.Panel): mask = wx.MaskColour(bmp, wx.BLUE) bmp.SetMask(mask) - wx.BitmapButton(self, 30, bmp, (160, 20), + b = wx.BitmapButton(self, 30, bmp, (260, 20), (bmp.GetWidth()+10, bmp.GetHeight()+10)) - self.Bind(wx.EVT_BUTTON, self.OnClick, id=30) + b.SetToolTipString("This is a bitmap button.") + self.Bind(wx.EVT_BUTTON, self.OnClick, b) + + + b = wx.Button(self, 40, "Flat Button?", (20,150), style=wx.NO_BORDER) + b.SetToolTipString("This button has a style flag of wx.NO_BORDER") + self.Bind(wx.EVT_BUTTON, self.OnClick, b) def OnClick(self, event):