Hi,
I'm developing an university project, and I have to take care of every
aspect of the user interface, that's why I need to set the colour of
every window I create, but I'm having
a hard time getting the menubar to look as I want, under GTK2 I
managed to set its colour
with the SetBackgroundStyle(wx.BG_STYLE_COLOUR) and SetBackgroundColour())
methods, but this doesn't work in Windows XP. I also tried with the
EVT_ERASE_BACKGROUND and EVT_PAINT events, the erase event worked with
the
status bar (I don't know if there is a better way to change its
colour) but doesn't work
with the menubar, it doesn't even trigger the event.
I know the menubar is getting its colour from the default system
colour for the frame client
area, but I think there should be a way to change this.
any help will be appreciated.
I think it's not possible, but I'm not sure.
Try ask on wx-users but don't give any reference that you are using
wxPython because they may think that is a wxPython related question and
it isn't.
Ricardo
···
On Thu, 2005-08-25 at 23:25 -0400, Gustavo Gonzalez wrote:
Hi,
I'm developing an university project, and I have to take care of every
aspect of the user interface, that's why I need to set the colour of
every window I create, but I'm having
a hard time getting the menubar to look as I want, under GTK2 I
managed to set its colour
with the SetBackgroundStyle(wx.BG_STYLE_COLOUR) and SetBackgroundColour())
methods, but this doesn't work in Windows XP. I also tried with the
EVT_ERASE_BACKGROUND and EVT_PAINT events, the erase event worked with
the
status bar (I don't know if there is a better way to change its
colour) but doesn't work
with the menubar, it doesn't even trigger the event.
I know the menubar is getting its colour from the default system
colour for the frame client
area, but I think there should be a way to change this.
any help will be appreciated.
Gustavo,
Under windows, you can do it using some win32 API calls. Attached is a
sample program for you to refer. Hope that helps!
Thank you,
-Kartic
MenuBGColor.py (2.44 KB)
···
On 8/25/05, Gustavo Gonzalez <gsgonzalez@gmail.com> wrote:
Hi,
I'm developing an university project, and I have to take care of every
aspect of the user interface, that's why I need to set the colour of
every window I create, but I'm having
a hard time getting the menubar to look as I want, under GTK2 I
managed to set its colour
with the SetBackgroundStyle(wx.BG_STYLE_COLOUR) and SetBackgroundColour())
methods, but this doesn't work in Windows XP. I also tried with the
EVT_ERASE_BACKGROUND and EVT_PAINT events, the erase event worked with
the
status bar (I don't know if there is a better way to change its
colour) but doesn't work
with the menubar, it doesn't even trigger the event.
I know the menubar is getting its colour from the default system
colour for the frame client
area, but I think there should be a way to change this.
any help will be appreciated.---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org