size of split page in AUINotebook?

(Python 2.5, wx.Pythin 2.8.10, WinXP and Linux)

I am using the (wxWidgets derived, not AGW for now) AUINotebook and
simply want to .Split() a page down to the bottom half of the
notebook. When I call this:

        self.nb.Split(1, wx.BOTTOM)

It splits, but the bottom page is about 1/5th the height of the top
page. I'd like them to be roughly equal--or even have control over
the exact page height. How can I do that? (Or why might it be
splitting things this unevenly?)

I've made a sample app with just bare panels, but it doesn't reproduce
my problem--there .Split() does in fact split them 50/50.

Thanks,
Che

Hi Che,

(Python 2.5, wx.Pythin 2.8.10, WinXP and Linux)

I am using the (wxWidgets derived, not AGW for now) AUINotebook and
simply want to .Split() a page down to the bottom half of the
notebook. When I call this:

   self\.nb\.Split\(1, wx\.BOTTOM\)

It splits, but the bottom page is about 1/5th the height of the top
page. I'd like them to be roughly equal--or even have control over
the exact page height. How can I do that? (Or why might it be
splitting things this unevenly?)

I've made a sample app with just bare panels, but it doesn't reproduce
my problem--there .Split() does in fact split them 50/50.

That shouldn't really happens, as the C++ code explicitely set the
AUINotebook to split 50/50 *IF* there are only 2 TabCtrls (i.e., it is
the first time you split the AuiNotebook). Other than that, the only
reason why this might happen depends on the best size the 2 panes
report to have, but I am just guessing here without a sample
reproducing the issue...

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever. <==

···

On 25 March 2010 03:13, C M wrote:

Thanks, Andrea and Gadget/Steve...but unfortunately for now I'm just
stuck. I tried simplifying things in my app by having it add blank
panels as notebook pages, and adjusting sizes or providing (-1,-1) as
sizes, and calling Layout() and Fit() somewhat indiscriminately, but I
guess there too many sizers-within-sizers in the frame for me to
easily figure out what's going on.

For now, I'm trying just using two AUINotebooks, one above the other,
though I'm not sure I'll remain satisfied with that, since users ought
to be able to choose how to display or not display these pages.
Thanks for the info, though.

Che

···

On Thu, Mar 25, 2010 at 9:31 AM, <GadgetSteve@live.co.uk> wrote:

--------------------------------------------------
From: "Andrea Gavana" <andrea.gavana@gmail.com>
Sent: Thursday, March 25, 2010 8:21 AM
To: <wxpython-users@googlegroups.com>
Subject: Re: [wxPython-users] size of split page in AUINotebook?

Hi Che,

On 25 March 2010 03:13, C M wrote:

(Python 2.5, wx.Pythin 2.8.10, WinXP and Linux)

I am using the (wxWidgets derived, not AGW for now) AUINotebook and
simply want to .Split() a page down to the bottom half of the
notebook. When I call this:

  self\.nb\.Split\(1, wx\.BOTTOM\)

It splits, but the bottom page is about 1/5th the height of the top
page. I'd like them to be roughly equal--or even have control over
the exact page height. How can I do that? (Or why might it be
splitting things this unevenly?)

I've made a sample app with just bare panels, but it doesn't reproduce
my problem--there .Split() does in fact split them 50/50.

That shouldn't really happens, as the C++ code explicitely set the
AUINotebook to split 50/50 *IF* there are only 2 TabCtrls (i.e., it is
the first time you split the AuiNotebook). Other than that, the only
reason why this might happen depends on the best size the 2 panes
report to have, but I am just guessing here without a sample
reproducing the issue...

Just a guess but I have seen similar effects when the panel within the frame
was longer than the frame, the panel - in this case the notebook is split
50-50 but as only 60% is visible the visible portion of it appears to be
split 50-10 or 1/6th of the way up. Could this be the problem? If it is
then there might be a missing call to Fit() that is the problem.
Gadget/Steve

Andrea.

When you have lots of nested sizers, it's usually a good idea to use
the Widget Inspection Tool to figure out what's going on. See
wiki.wxpython.org/Widget%20Inspection%20Tool for more info.

···

On Mar 25, 4:33 pm, C M <cmpyt...@gmail.com> wrote:

On Thu, Mar 25, 2010 at 9:31 AM, <GadgetSt...@live.co.uk> wrote:

> --------------------------------------------------
> From: "Andrea Gavana" <andrea.gav...@gmail.com>
> Sent: Thursday, March 25, 2010 8:21 AM
> To: <wxpython-users@googlegroups.com>
> Subject: Re: [wxPython-users] size of split page in AUINotebook?

>> Hi Che,

>> On 25 March 2010 03:13, C M wrote:

>>> (Python 2.5, wx.Pythin 2.8.10, WinXP and Linux)

>>> I am using the (wxWidgets derived, not AGW for now) AUINotebook and
>>> simply want to .Split() a page down to the bottom half of the
>>> notebook. When I call this:

>>> self.nb.Split(1, wx.BOTTOM)

>>> It splits, but the bottom page is about 1/5th the height of the top
>>> page. I'd like them to be roughly equal--or even have control over
>>> the exact page height. How can I do that? (Or why might it be
>>> splitting things this unevenly?)

>>> I've made a sample app with just bare panels, but it doesn't reproduce
>>> my problem--there .Split() does in fact split them 50/50.

>> That shouldn't really happens, as the C++ code explicitely set the
>> AUINotebook to split 50/50 *IF* there are only 2 TabCtrls (i.e., it is
>> the first time you split the AuiNotebook). Other than that, the only
>> reason why this might happen depends on the best size the 2 panes
>> report to have, but I am just guessing here without a sample
>> reproducing the issue...

> Just a guess but I have seen similar effects when the panel within the frame
> was longer than the frame, the panel - in this case the notebook is split
> 50-50 but as only 60% is visible the visible portion of it appears to be
> split 50-10 or 1/6th of the way up. Could this be the problem? If it is
> then there might be a missing call to Fit() that is the problem.
> Gadget/Steve

>> Andrea.

Thanks, Andrea and Gadget/Steve...but unfortunately for now I'm just
stuck. I tried simplifying things in my app by having it add blank
panels as notebook pages, and adjusting sizes or providing (-1,-1) as
sizes, and calling Layout() and Fit() somewhat indiscriminately, but I
guess there too many sizers-within-sizers in the frame for me to
easily figure out what's going on.

For now, I'm trying just using two AUINotebooks, one above the other,
though I'm not sure I'll remain satisfied with that, since users ought
to be able to choose how to display or not display these pages.
Thanks for the info, though.

Che

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

I am using wxPython3.0.0 and Python2.6 on a Windows box.

I modified the “AUI_Notebook.py” from the demo to create just two windows. I added a Split(0,wx.RIGHT). The “right” window is slammed all the way to the right, and I have to drag the divider back to the middle. Any thoughts?

for num in range(1, 2):

page = wx.TextCtrl(self.nb, -1, “This is page %d” % num ,

style=wx.TE_MULTILINE)

self.nb.AddPage(page, “Tab Number %d” % num)

self.nb.Split(0,wx.RIGHT)

sizer = wx.BoxSizer()

···

On Wednesday, March 24, 2010 10:13:09 PM UTC-5, Che M wrote:

(Python 2.5, wx.Pythin 2.8.10, WinXP and Linux)
I am using the (wxWidgets derived, not AGW for now) AUINotebook and
simply want to .Split() a page down to the bottom half of the
notebook. When I call this:

self.nb.Split(1, wx.BOTTOM)

It splits, but the bottom page is about 1/5th the height of the top
page. I’d like them to be roughly equal–or even have control over
the exact page height. How can I do that? (Or why might it be
splitting things this unevenly?)

I’ve made a sample app with just bare panels, but it doesn’t reproduce
my problem–there .Split() does in fact split them 50/50.

Thanks,
Che