Re: [wxPython] change colour of notebook

已查看 3 次
跳至第一个未读帖子

ssh-gmx

未读,
2001年10月4日 00:39:022001/10/4
收件人 wxpytho...@lists.wxwindows.org
i didnt try it - but maybe in this way:

parent = notebookchild.GetParent()
parent.SetBackgroundColour( ...)

best regards


----- Original Message -----
From: "Dr. Georg Beinlich" <cor...@web.de>
To: <wxpytho...@lists.wxwindows.org>
Sent: Thursday, October 04, 2001 11:34 AM
Subject: [wxPython] change colour of notebook


> hi everybody,
> is there a possibility to change the background-colour of a notebook? (not
the colour of a notebook child)
> I would also like to change the colour of the tab-text.
> thanks to all
> _______________________________________________________________________
> 1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
> Ihr...@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de
>
>
>
> _______________________________________________
> wxpython-users mailing list
> wxpytho...@lists.wxwindows.org
> http://lists.wxwindows.org/mailman/listinfo/wxpython-users
>
>

Dr. Georg Beinlich

未读,
2001年10月3日 23:42:022001/10/3
收件人 wxpytho...@lists.wxwindows.org

Moore, Paul

未读,
2001年10月4日 03:05:022001/10/4
收件人 wxpytho...@lists.wxwindows.org
From: ssh-gmx [mailto:hei...@gmx.de]

> From: "Dr. Georg Beinlich" <cor...@web.de>
> > hi everybody,
> > is there a possibility to change the background-colour of a
> > notebook?
>
> i didnt try it - but maybe in this way:
>
> parent = notebookchild.GetParent()
> parent.SetBackgroundColour( ...)

No, that doesn't (quite) work.

notebook.SetBackgroundColour() sets the border and the clear area behind the
tabs, but *not* the colour of the tabs themselves. Which looks very ugly.
notebook.SetForegroundColour() seems to do nothing. There is no way I can
find to change the tab text colour (or font, or anything else, for that
matter...)

This is on Windows 2000, wxPython 2.3.1, Python 2.1.

Paul.

ssh-gmx

未读,
2001年10月4日 06:51:022001/10/4
收件人 wxpytho...@lists.wxwindows.org
another idea:
use EVT_PAINT in your parent.
in OnPaint you can call GetClientRect and GetRect -
the difference of the two rectangles migth be the Area which you want to
fill.
best regard

----- Original Message -----
From: "Moore, Paul" <Paul....@atosorigin.com>
To: <wxpytho...@lists.wxwindows.org>

Robin Dunn

未读,
2001年10月5日 05:47:022001/10/5
收件人 wxpytho...@lists.wxwindows.org
> is there a possibility to change the background-colour of a notebook? (not
the colour of a notebook child)
> I would also like to change the colour of the tab-text.

The wxNotebook class doesn't support doing this. I think on Windows it
would mean using the control in owner drawn mode, which would make it much
more complicated.

--
Robin Dunn
Software Craftsman
ro...@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

回复全部
回复作者
转发
0 个新帖子