Toolbar background color

Hi,

I’ve created a toolbar in my program, but it has a lightgray background… which is not the same as the GetThemeBackgroundColour() … which I would like it to be… I’ve been trying to find the command for changing the background colour of a Toolbar… without luck…

Does anyone know how to do this?

Best,
Soren

For various introspection reasons, I need to be able to ask a
wx.TextCtrl for the value previously set in
wx.TextCtrl.SetMaxLength(). Is there any mechanism available to do
this?

I don't understand why wxWigets provides a setter for maximum length,
but not a getter.

Christoper L. Spencer
CTO ROXX, LLC
4515 Leslie Ave.
Cincinnati, OH
45242
TEL: 513-297-1260
FAX: 513-297-1280
EMAIL: chris@roxx.biz

Sorry, there was a mishap.

I don’t understand it either, but it is like the rain: don’t protest in vain, and open your umbrella.
In the actual case, I suggest you subclass wx.TextCtrl, override the method SetMaxLength() as follows:
def SetMaxlength(self, length):
assert length >= 0
self.MaxLength = length
wx.TextCtrl.SetMaxLength(self, length)

and then you build your getter:
def GetMaxLength(self):
return self.MaxLength

···

2008/2/13, Raffaello Barella barbarossa.platz@gmail.com:

I don’t understand it either, but it is like the rain: don’t protest in vain, and open your umbrella.
In the actual case, I suggest you subclass wx.TextCtrl, override the method SetMaxLength() as follows:

2008/2/13, Christopher L. Spencer chris@roxx.biz:

For various introspection reasons, I need to be able to ask a
wx.TextCtrl for the value previously set in
wx.TextCtrl.SetMaxLength(). Is there any mechanism available to do
this?

I don’t understand why wxWigets provides a setter for maximum length,

but not a getter.

Christoper L. Spencer
CTO ROXX, LLC
4515 Leslie Ave.
Cincinnati, OH
45242
TEL: 513-297-1260
FAX: 513-297-1280
EMAIL: chris@roxx.biz


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Thanks for the reply Robin!

Søren Nielsen wrote:

Hi,

I’ve created a toolbar in my program, but it has a lightgray

background… which is not the same as the GetThemeBackgroundColour() …

which I would like it to be…

Platform and version?

I’m using win XP and wxpython 2.7.1

I’ve been trying to find the command for

changing the background colour of a Toolbar… without luck…

Does anyone know how to do this?

toolbar.SetBackgroundColour(newColour)

After some searching I found that method… but I need the default system colour (the default toolbar gray in windows), is there a way to obtain this?