How can I control AUINotebook?

Hello list,

I’ve started playing with AUI recently… and I’m using the AUINotebook.
I’ve played with it a little and I’ve seen that you can split the notebook puting pages to the right or to the left by dragging them there.

How can I control such positioning at notebook creation?
I would like to add a bunch of pages to the notebook and one page separately to the right.
I know that I can just create 2 notebooks and get the same effect but I was wondering if there is a way to do that using only one, something like “AddPageToTheRight” or notebook._aui_manager.AddPane() :slight_smile:

Thank you in advance.
Peter

···


There is NO FATE, we are the creators.

never tried it but there’s a method called Split:

void Split(size_t page, int direction)

Split performs a split operation programmatically. The argument page indicates the page that will be split off. This page will also become the active page after the split. The direction argument specifies where the pane should go, it should be one of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT.

···

On 2/26/07, Peter Damoc pdamoc@gmail.com wrote:

Hello list,

I’ve started playing with AUI recently… and I’m using the AUINotebook.
I’ve played with it a little and I’ve seen that you can split the notebook puting pages to the right or to the left by dragging them there.

How can I control such positioning at notebook creation?
I would like to add a bunch of pages to the notebook and one page separately to the right.
I know that I can just create 2 notebooks and get the same effect but I was wondering if there is a way to do that using only one, something like “AddPageToTheRight” or notebook._aui_manager.AddPane() :slight_smile:

Thank you in advance.
Peter

There is NO FATE, we are the creators.

Thanks, this works… kinda…

The page is actually the index of the page… now all I need is a way to control the split… right now is too far to the left, way to far.

Also… as a bug… if the split is done to the TOP the splitter cannot be used, it is blocked, it will not move.

Here is the code to prove it:

import wx
import wx.aui

class MyFrame(wx.Frame):
def init(self):
wx.Frame.init(self, None, title=“AUI splitter bug”)
nb = wx.aui.AuiNotebook
(self)
nb.AddPage(wx.Panel(nb), “Page1”)
nb.AddPage(wx.Panel(nb), “Page2”)
nb.Split(1, wx.TOP)

if name ==“main”:
app = wx.App(0)
frame = MyFrame()

frame.Show()
app.MainLoop()

Platform: Win XP2, py2.4, wxpython (2, 8, 1, 2, ‘.20070209’)

Peter

···

On 2/26/07, roee shlomo roee88@gmail.com wrote:

never tried it but there’s a method called Split:

void Split(size_t page, int direction)

Split performs a split operation programmatically. The argument page indicates the page that will be split off. This page will also become the active page after the split. The direction argument specifies where the pane should go, it should be one of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT.

On 2/26/07, Peter Damoc pdamoc@gmail.com wrote:

Hello list,

I’ve started playing with AUI recently… and I’m using the AUINotebook.

I’ve played with it a little and I’ve seen that you can split the notebook puting pages to the right or to the left by dragging them there.

How can I control such positioning at notebook creation?
I would like to add a bunch of pages to the notebook and one page separately to the right.
I know that I can just create 2 notebooks and get the same effect but I was wondering if there is a way to do that using only one, something like “AddPageToTheRight” or notebook._aui_manager.AddPane() :slight_smile:

Thank you in advance.
Peter

There is NO FATE, we are the creators.


There is NO FATE, we are the creators.

Peter Damoc wrote:

Hello list,

I've started playing with AUI recently... and I'm using the AUINotebook.
I've played with it a little and I've seen that you can split the notebook puting pages to the right or to the left by dragging them there.

How can I control such positioning at notebook creation?
I would like to add a bunch of pages to the notebook and one page separately to the right.
I know that I can just create 2 notebooks and get the same effect but I was wondering if there is a way to do that using only one, something like "AddPageToTheRight" or notebook._aui_manager.AddPane() :slight_smile:

Please add a feature request about this. Hopefully Ben will address this when he has time to work on it again.

···

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