I haven’t used wxPython in a while - but if
memory serves you need the pane to allow the tab key to work
correctly. I do recall that I always added a panel.
Johnf
···
On 04/20/2018 05:17 PM, Mario Lacunza
wrote:
Hi,
As far I can remember adding a pane is for looking good in
windows, please someone can confirm it?, at least in Linux
you dont need it.
[`InsertPage`](https://docs.wxpython.org/wx.aui.AuiNotebook.html?highlight=notebook%20insertpage#wx.aui.AuiNotebook.InsertPage)
is similar to AddPage, but allows the ability to specify the
insert location
Saludos / Best regards
Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: [http://www.lacunza.biz/](http://www.lacunza.biz/)
Hosting:: [http://mlv-host.com/](http://mlv-host.com/)
Skype: mlacunzav
Lima - Peru
earlier version of wxPython to add pages to notebook tabs I
created
panes, then added each pane to the notebook; e.g.,
self.pane_1 = modProject(self, wx.ID_ANY)
self.pane_2 = modComponent(self, wx.ID_ANY)
self.pane_3 = modScoping(self, wx.ID_ANY)
...
self.AddPage(self.pane_1, "Project")
self.AddPage(self.pane_2, "Components")
self.AddPage(self.pane_3, "Scoping")
Looking at the 4.0.1 Notebook.py demo code it appears that
panes are no
longer necessary; I can add each page directly. Is this
correct?
Related question: When should one use InsertPage rather
than AddPage?
Rich
--
You received this message because you are subscribed to
the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails
Then there is nothing functionally different there than with the above, other than saving a reference to the modProject instance. If you don’t need access to that instance later on for some reason then there is no need to save it. But it doesn’t hurt anything to do so either. Mainly, it’s just a matter of choice, coding style, and what makes the most sense for you.
Related question: When should one use InsertPage rather than AddPage?
When you want to insert the page somewhere before the current last page. Just think of AddPage as if it was named AppendPage and it should make sense.
···
On Friday, April 20, 2018 at 3:21:18 PM UTC-7, Rich wrote:
Then there is nothing functionally different there than with the above,
other than saving a reference to the modProject instance. If you don't need
access to that instance later on for some reason then there is no need to
save it. But it doesn't hurt anything to do so either. Mainly, it's just a
matter of choice, coding style, and what makes the most sense for you.
Robin,
Thanks for explaining. This project is different from what I've done in
the past so I don't now know what I want. I need to read the wx.Grid API
and tutorial pages now.
My objective with the MainFrame module (having the menu and status bar and
a notebook class) is to load a subject-specific grid in the panel of each
notebook tab to display data retrieved from the database tables (one row if
there are no available data), then display a dialog box to add/edit new
subject data as appropriate. More reading on my part is my focus.
Related question: When should one use InsertPage rather than AddPage?
When you want to insert the page somewhere before the current last page.
Just think of AddPage as if it was named AppendPage and it should make
sense.
This does clarify the difference between insert and add. Many thanks.