b = wxGenButton(self, -1, 'disabled')
EVT_BUTTON(self, b.GetId(), self.OnButton)
- b.Enable(false)
+ b.Enable(False)
sizer.Add(b)
b = wxGenButton(self, -1, 'bigger')
EVT_BUTTON(self, b.GetId(), self.OnBiggerButton)
- b.SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD, false))
+ b.SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD, False))
b.SetBezelWidth(5)
###b.SetBestSize()
b.SetBackgroundColour("Navy")
EVT_BUTTON(self, b.GetId(), self.OnButton)
sizer.Add(b)
+ bmp = images.getTest2Bitmap()
+ b = wxGenBitmapButton(self, -1, bmp)
+ EVT_BUTTON(self, b.GetId(), self.OnButton)
+ sizer.Add(b)
+ b.Enable(False)
+
b = wxGenBitmapButton(self, -1, None)
EVT_BUTTON(self, b.GetId(), self.OnButton)
bmp = images.getBulb1Bitmap()
b.SetBitmapSelected(bmp)
b.SetBestSize()
sizer.Add(b)
- sizer.Add(10,10)
b = wxGenToggleButton(self, -1, "Toggle Button")
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
- b.SetToggle(true)
+ b.SetToggle(True)
b.SetBestSize()
sizer.Add(b)
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
- b.SetUseFocusIndicator(false)
+ b.SetUseFocusIndicator(False)
b.SetBestSize()
sizer.Add(b)
import wxPython.lib.buttons
overview = wxPython.lib.buttons.__doc__
+
+
+
+if __name__ == '__main__':
+ import sys,os
+ import run
+ run.main(['', os.path.basename(sys.argv[0])])
+