On Wednesday 10 February 2010 09:07:51 pm Paul McNett wrote: > On 2/10/10 7:55 PM, John wrote: > > 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#wxwindowsetforegroundc > >>olo ur > >> http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindowsetownforegrou > >>ndc 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 > > > > Your solution works well with Linux but sadly not with windows. :-( > > I tried both SetOwnForegroundColour and SetOwnBackgroundColour. > > Did you try a refresh() in there, too? > > Paul
Still no joy. Once I disable the control I can't change anything (background color or font color). Once I enable the font or background color appears. 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]
