473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

wxNotebook on a wxPanel.. how?

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 shows up on the
panel.. why is that? If I add a button or checkbox to the sizer on that
panel, it shows. A notebook ctrl just isn't visible. The code is below:

I checked and AddPage() returns True
Weird thing is I can see a little bit, like the corner of a button
where the wxNotebook is supposed to start.

class TabPage(wxPanel):
def __init__(self, parent):
wxPanel.__init__(self, parent, -1)

self.nb = wxNotebook(self, -1)
self.nb.AddPage(wxPanel(self.nb, -1), "Settings")

sizer = wxBoxSizer(wxHORIZONTAL)
sizer.Add(self.nb(self))
self.SetSizer(sizer)
self.Layout()
self.Fit()

Jul 18 '05 #1
1 3610
The above code I pasted was not correct. I pasted an older version. The
sizer.Add() line should of been sizer.Add(self.nb) -- omit the (self).

but I fixed the problem. I had to change that same line to
sizer.add(self.nb, 1, wxEXPAND|wxALL)

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
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...
1
by: Piet | last post by:
Hello, I am still struggling with a dynamic dialog box. I have created a dialog box that will show a variable number of controls depending on a selection made in a ComboBox also present in the...
4
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...
2
by: CYBER | last post by:
Is this possible to create 1 wxFrame and register more than 1 wxPanel in it. And select the one you want to show at the moment ? I'm trying to implement a multistep wizard under wxPython. I...
0
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...
3
by: Sam | last post by:
Hello, I'm currently creating a GUI, which consists of a main frame that contains a menu bar,a toolbar and an empty panel, let's call it main_panel. Ideally, I'd like the following...
3
by: mardif | last post by:
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...
1
by: skksundar | last post by:
Hi there, Gotta problem n embedding a close button in the notebook Lemme know if there are any specific method of doing it!! To be specific, i need it look like the close tab in mozille r...
1
by: Astan Chee | last post by:
Hi, I have a wxNoteBook with a bunch of wxPanels attached to it as pages. Every page has its own GUI items. What Im trying to do is on a certain page, a certain GUI (wxTextCtrl) to be resized...
0
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,...
0
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$) { } ...
0
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...
0
BarryA
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...
1
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...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.