On mouse-enter, change on/off icon to on, on mouse-out, change on/off icon to previous state
This commit is contained in:
parent
9b31b8f6b3
commit
eb0aac458b
1 changed files with 8 additions and 0 deletions
|
@ -101,10 +101,14 @@ class ToggleButton(buttons.GenBitmapToggleButton):
|
|||
|
||||
def OnMouseEnter(self, event):
|
||||
self.GetParent().OnPopupDisplay(event)
|
||||
self.SetBitmap(True)
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
def OnMouseLeave(self, event):
|
||||
self.GetParent().OnPopupHide(event)
|
||||
self.SetBitmap(self.GetValue())
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
class RadioButton(buttons.GenBitmapButton):
|
||||
|
@ -159,10 +163,14 @@ class RadioButton(buttons.GenBitmapButton):
|
|||
|
||||
def OnMouseEnter(self, event):
|
||||
self.GetParent().OnPopupDisplay(event)
|
||||
self.SetBitmap(True)
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
def OnMouseLeave(self, event):
|
||||
self.GetParent().OnPopupHide(event)
|
||||
self.SetBitmap(self.GetValue())
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
class NormalButton(buttons.GenBitmapButton):
|
||||
|
|
Loading…
Reference in a new issue