[wxPython-users] FlatNotebok questions

Oswaldo Hernández listas at soft-com.es
Tue Jun 26 05:09:29 PDT 2007


Andrea Gavana escribi=F3:
> Hi Robin and Oswaldo,
> =

> On 6/25/07, Robin Dunn wrote:
>> Oswaldo Hern=E1ndez wrote:
>> > Hello all,
>> >
>> > I'm trying to use FlatNotebook first time and i have some questions:
>> >
>> > Sizers:
>> >
>> > When put a FlatNotebook on a sizer an do
>> > sizer.SetSizeHints(flatnotebook) the size is calculated for the active
>> > tab contents, if there is another tab with a bigger content is ignored.
>> > May I calculate the size of all tabs content and tell the sizer the
>> > biggest size?
>>
>> Probably the best thing to do for this is to change FlatNotebook to
>> derive from wx.PyPanel and override DoGetBestSize.  That method should
>> find the biggest best size of the pages and add space for the tabs and
>> return the result.
> =

> I have implemented a patch for FlatNotebook and its demo: it seems to
> work, but I would appreciate if someone will double-check what I have
> done:
> =

> 1) The Enable method is now called EnableTab;
> 2) FlatNotebook now derives from wx.PyPanel, and I have implemented
> the DoGetBestSize method (hopefully correctly).
> =

> Please let me know if you see something strange...
> =


Andrea, Robin, you are fantastic :)

I apply the patch and now SetSizeHints() calculate the size of the bigger t=
ab, and Enable now =

enable/disable the whole notebook.

Another question that i forgot in the previous message:

If you have the focus outside of notebook and press TAB key for navigation,=
 the focues never enter =

into the notebook.

I attach a sample program for test size, enable and the navigation .

Thanks

-- =

*****************************************
Oswaldo Hern=E1ndez
oswaldo (@) soft-com (.) es
*****************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testnotebook.py
Type: text/x-python
Size: 2641 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20070=
626/59319f24/testnotebook.py


More information about the wxpython-users mailing list