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:
parent
6999b0d8e9
commit
fbff5d1ba5
@ -64,6 +64,7 @@ class TestPanel(wxPanel):
|
||||
mask = wxMaskColour(bmp, wxBLUE)
|
||||
bmp.SetMask(mask)
|
||||
b.SetBitmapSelected(bmp)
|
||||
b.SetToggle(true)
|
||||
|
||||
|
||||
def OnButton(self, event):
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user