On Wednesday 10 February 2010 09:23:41 am Paul McNett wrote:
> On 2/10/10 8:54 AM, Ed Leafe wrote:
> > On Feb 10, 2010, at 11:49 AM, Ricardo Aráoz wrote:
> >> Isn't there a "DisabledForeColour"? Can't you set the ForeColour
> >> manually after disabling the control?
> >
> >     I think you're stuck in the VFP mindset. wxPython handles the rendering
> > of disabled controls; you can't change that programmatically.
>
> See:
>
> http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindowsetforegroundcolo
>ur
> http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindowsetownforegroundc
>olour
>
> There may be hope in doing something like:
>
> class MyDropdown(dabo.ui.dDropdownList):
>    def enable(self):
>      self.Enabled = True
>      self.SetOwnForegroundColour(None)  ## use the default
>
>    def disable(self):
>      self.Enabled = False
>      self.SetOwnForegroundColour((20, 0, 192))
>
> This is untested. If something like this happens to work on all platforms,
> we can think about including a property like DisabledForeColor.
>
> Note the warning about overriding the theme settings of the user. IOW, the
> control is by default using a color for the disabled control as set by the
> theme currently being used by the window manager. Theoretically, the user
> is in control of this stuff.
>
> Paul


This looks interesting.  In this special case I'm not to worried about the 
theme because this is at the request of the user.  
Thanks

Johnf


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to