projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed include paths to our copies of 3rd party libs
[wxWidgets.git]
/
wxPython
/
demo
/
GenericButtons.py
diff --git
a/wxPython/demo/GenericButtons.py
b/wxPython/demo/GenericButtons.py
index ad30e9752c414298d9ba15a8f9383d5345f67099..c3e7ff40398dd0543da0d22560aa03563c79f53b 100644
(file)
--- a/
wxPython/demo/GenericButtons.py
+++ b/
wxPython/demo/GenericButtons.py
@@
-28,12
+28,12
@@
class TestPanel(wxPanel):
b = wxGenButton(self, -1, 'disabled')
EVT_BUTTON(self, b.GetId(), self.OnButton)
b = wxGenButton(self, -1, 'disabled')
EVT_BUTTON(self, b.GetId(), self.OnButton)
- b.Enable(
f
alse)
+ b.Enable(
F
alse)
sizer.Add(b)
b = wxGenButton(self, -1, 'bigger')
EVT_BUTTON(self, b.GetId(), self.OnBiggerButton)
sizer.Add(b)
b = wxGenButton(self, -1, 'bigger')
EVT_BUTTON(self, b.GetId(), self.OnBiggerButton)
- b.SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD,
f
alse))
+ b.SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD,
F
alse))
b.SetBezelWidth(5)
###b.SetBestSize()
b.SetBackgroundColour("Navy")
b.SetBezelWidth(5)
###b.SetBestSize()
b.SetBackgroundColour("Navy")
@@
-46,6
+46,12
@@
class TestPanel(wxPanel):
EVT_BUTTON(self, b.GetId(), self.OnButton)
sizer.Add(b)
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 = wxGenBitmapButton(self, -1, None)
EVT_BUTTON(self, b.GetId(), self.OnButton)
bmp = images.getBulb1Bitmap()
@@
-58,7
+64,6
@@
class TestPanel(wxPanel):
b.SetBitmapSelected(bmp)
b.SetBestSize()
sizer.Add(b)
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)
b = wxGenToggleButton(self, -1, "Toggle Button")
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
@@
-74,7
+79,7
@@
class TestPanel(wxPanel):
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
- b.SetToggle(
t
rue)
+ b.SetToggle(
T
rue)
b.SetBestSize()
sizer.Add(b)
b.SetBestSize()
sizer.Add(b)
@@
-88,7
+93,7
@@
class TestPanel(wxPanel):
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
- b.SetUseFocusIndicator(
f
alse)
+ b.SetUseFocusIndicator(
F
alse)
b.SetBestSize()
sizer.Add(b)
b.SetBestSize()
sizer.Add(b)
@@
-128,3
+133,11
@@
def runTest(frame, nb, log):
import wxPython.lib.buttons
overview = wxPython.lib.buttons.__doc__
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])])
+