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??
thx in advance!
bye 3 3206
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
No no!!!
Your example is OK, great!
but is not my problem:
If you set:
frame.SetBackgroundColour(wx.RED)
On unix, you can see that label "form1" and "form2" are grey, and
others elements are red.
But on Windows, on the same line of "form1" and "form2", the color is
not red, but grey as labels.
I want to color this space RED!!!
Rob Wolfe wrote:
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
mardif wrote:
If you set:
frame.SetBackgroundColour(wx.RED)
On unix, you can see that label "form1" and "form2" are grey, and
others elements are red.
But on Windows, on the same line of "form1" and "form2", the color is
not red, but grey as labels.
I want to color this space RED!!!
Oh, I see now. I don't know if that is possible on windows.
SetBackgroundColour works differently on windows than on unix,
so probably native windows widget doesn't support this feature.
(but I can be wrong of course.)
Regards,
Rob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gandalf |
last post by:
How can I hide/show a page (wxNotebookPage) invisible of a wx.wxNotebook
instance?
There is a GetPage() method which returns a wxNotebookPage but I could
not find
any documentation in the help...
|
by: phark52 |
last post by:
I have a wxFrame. On it is a wxNotebook, the Notebook ctrl has 5 tabs
(Each one is a wxPanel.) On one of the tab pages (panels) I want to add
another notebook ctrl. I get no errors but nothing...
|
by: support.services.complaints |
last post by:
Ok i have a wxFrame with a wxNotebook that has two wxPanels, lets call
them panel_1 and panel_2
i have wxTextCtrl in panel_1 (call it panel_1_ctrl) that i want the
user to be able to fill up. I...
|
by: Jan Tuxen |
last post by:
Jakob Nielsen in his most recent Alertbox
(http://www.useit.com/alertbox/20040503.html) tells web authors to
change the color of visited links.
I agree to his purpose: Help users understand...
|
by: AFN |
last post by:
I'm trying to set a submit button to change text and color when clicked.
Like saying "please wait" instead of "submit" and then changing the
background color and text color. All works, except for...
|
by: klaus.roedel |
last post by:
Hi,
I've implemented a wxnotebook on my application.
I can set a tooltip for the complete notebook, but I want to set for
every page a tooltip, so that the user can get additionally information...
|
by: udir |
last post by:
Thanks, Udi Raz
|
by: Roger |
last post by:
Is this an easy thing to change?
I want to put an option button on a form and want to dynamically change the
color (Red, Yellow, Green) for
showing a status. I figured it would be an easy task,...
|
by: Joe |
last post by:
I want to fade a color to another color in a user control. Actually the
color is the BackColor of the User control.
What's the easiest way to do this?
Thanks,
Joe
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |