Re: Phoenix - AquaButton and EVT_UPDATE_UI
Werner <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2/26/2015 20:37, Robin Dunn wrote:
> Werner wrote:
>> Hi,
>>
>> I noticed that the button is not refreshing when I do below, so I added
>> the last line in the handler. Now the problem does only show if I use
>> wx.lib.agw.aquabutton.
>>
>> Any tip of what needs to change in AquaButton to do the refresh
>> automatically?
>
> Try overriding DoEnable in AquaButton with something like this:
>
> def DoEnable(self, enable):
> wasEnabled = self.IsEnabled()
> super(AquaButton, self).DoEnable(enable)
> if self.IsEnabled() != wasEnabled:
> self.Refresh()
>
I can only get it to work like this:
def DoEnable(self, enable):
"""
Overridden base class virtual.
Need to Refresh if Enable state changed.
"""
self.Refresh()
It looks like the enable state is already changed by the time DoEnable
is called.
Does this make sense?
Werner
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.