One more quickie

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 1999-12-11 08:09:25 +00:00
parent 6999b0d8e9
commit fbff5d1ba5
2 changed files with 9 additions and 0 deletions

View File

@ -64,6 +64,7 @@ class TestPanel(wxPanel):
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
b.SetBitmapSelected(bmp)
b.SetToggle(true)
def OnButton(self, event):

View File

@ -303,6 +303,12 @@ class wxGenBitmapButton(wxGenButton):
class __ToggleMixin:
def SetToggle(self, flag):
self.up = not flag
def GetToggle(self):
return not self.up
def OnLeftDown(self, event):
if not self.IsEnabled():
return
@ -329,6 +335,8 @@ class __ToggleMixin:
event.Skip()
class wxGenToggleButton(__ToggleMixin, wxGenButton):
pass