background color question

If I want to set the background color of a wx.TextCtrl to
that of a wx.StaticText - which color do I have to chose ?

Is there any wxSYS_COLOUR_ constant for that ? I haven't
been able to find it.

Karsten

···

--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

Hello,

If I want to set the background color of a wx.TextCtrl to
that of a wx.StaticText - which color do I have to chose ?

Is there any wxSYS_COLOUR_ constant for that ? I haven't
been able to find it.

Depending on platform StaticText is either drawn on its parent window
or it is its own window. So the background colour is the colour of
whatever window is its parent (i.e wxPanel). You probably want
SYS_COLOUR_3DFACE.

I also wrote a demo module for all the SystemSettings stuff if you
want an easy way to look at them all at once, it can be downloaded
from the wxPython svn or online
(http://svn.wxwidgets.org/viewvc/wx/wxPython/branches/WX_2_8_BRANCH/demo/SystemSettings.py?view=log).

Cody

···

On Fri, Apr 24, 2009 at 10:11 AM, Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:

> If I want to set the background color of a wx.TextCtrl to
> that of a wx.StaticText - which color do I have to chose ?
>
> Is there any wxSYS_COLOUR_ constant for that ? I haven't
> been able to find it.

Depending on platform StaticText is either drawn on its parent window
or it is its own window. So the background colour is the colour of
whatever window is its parent (i.e wxPanel). You probably want
SYS_COLOUR_3DFACE.

Thanks.

I also wrote a demo module for all the SystemSettings stuff if you
want an easy way to look at them all at once, it can be downloaded
from the wxPython svn or online
(http://svn.wxwidgets.org/viewvc/wx/wxPython/branches/WX_2_8_BRANCH/demo/SystemSettings.py?view=log).

Nice !

Karsten

···

On Fri, Apr 24, 2009 at 10:34:42AM -0500, Cody Precord wrote:
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

Cody Precord wrote:

Hello,

If I want to set the background color of a wx.TextCtrl to
that of a wx.StaticText - which color do I have to chose ?

Is there any wxSYS_COLOUR_ constant for that ? I haven't
been able to find it.
    
Depending on platform StaticText is either drawn on its parent window
or it is its own window. So the background colour is the colour of
whatever window is its parent (i.e wxPanel). You probably want
SYS_COLOUR_3DFACE.

I also wrote a demo module for all the SystemSettings stuff if you
want an easy way to look at them all at once, it can be downloaded
from the wxPython svn or online
(http://svn.wxwidgets.org/viewvc/wx/wxPython/branches/WX_2_8_BRANCH/demo/SystemSettings.py?view=log).

Thanks for that. Its a nice utility and a nice bit of sample code as well.

L.

···

On Fri, Apr 24, 2009 at 10:11 AM, Karsten Hilbert > <Karsten.Hilbert@gmx.net> wrote: