The generic buttons can create their own disabled bitmap if needed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-11-09 21:37:31 +00:00
parent b867e68cef
commit 759c8b5299
3 changed files with 75 additions and 6 deletions

View File

@@ -46,6 +46,12 @@ class TestPanel(wxPanel):
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()
@@ -58,7 +64,6 @@ class TestPanel(wxPanel):
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)
@@ -128,3 +133,11 @@ def runTest(frame, nb, log):
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])])