Re: wxNotebook color change
- From: "Rob Wolfe" <blue99@xxxxxxxxxx>
- Date: 31 Aug 2006 05:09:46 -0700
mardif wrote:
Hi !
this is my problem:
I've a wxNotebook object, which contains 2 Panels.
On up, there is TAB section, I have 2 tabs.
I want to color the TAB section with ( for example ) red color.
I've tried with SetBackgroundColour() for wxNotebook object and for 2
panel inside, but it doesn't works.
why??
Presumably you forgot to refresh window. Try this:
<code>
import wx
app = wx.PySimpleApp()
frame = wx.Frame(None, -1, "Notebook")
nb = wx.Notebook(frame, -1)
form1 = wx.Panel(nb, -1)
nb.AddPage(form1, "Form1")
form2 = wx.Panel(nb, -1)
form2.SetBackgroundColour(wx.RED)
nb.AddPage(form2, "Form2")
nb.SetSelection(1)
frame.Refresh()
frame.Show(True)
app.MainLoop()
</code>
HTH,
Rob
.
- Follow-Ups:
- Re: wxNotebook color change
- From: mardif
- Re: wxNotebook color change
- References:
- wxNotebook color change
- From: mardif
- wxNotebook color change
- Prev by Date: Re: Broadcast server
- Next by Date: Re: [ANN] ratfun-2.3 Polynomials and Rational Functions
- Previous by thread: wxNotebook color change
- Next by thread: Re: wxNotebook color change
- Index(es):
Relevant Pages
|