[wxPython] Re: Which Tabbed stuff to use?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] Re: Which Tabbed stuff to use?

Robin Dunn
>
> I'm getting confused about which approach to use when designing windows
> with Tabs.
>
> The 'Tab classes overview' describes using wxTabView, wxPanelTabView,
> wxTabbedPanel, wxTabbedDialog and wxTabControl.  I tried implementing the
> example from this overview, and had no luck with wxTabbedDialog.

The Tab classes are not portable and so were not implemented in wxPython
since wxNotebook is.  I think the reason they are still in the library is
because wxNotebook is implemented using the Tab classes on some platforms
that don't have a native notebook control.

>
> The other alternative is using wxNotebook...  The demo program uses this
> nicely, but always with a single widget on each tab.  Is is true that in
> order to add multiple widgets, they must be added to a panel (or window),
> and the panel added to the tab?

Yes, but you also have to add windows containing controls to the TabView.
The only thing you loose is the ability to share common controls from page
to page.

> This seems like a big layering nightmare
> for complicated screens...and really a headache to perform any type of
> automatic layout management.
>

Not really.  The wxDialog/wxPanel keyboard traversal handlers have recently
been fixed to take care of nested panels with controls on them.  It should
work for Notebooks too if I remember correctly.

Also, using Sizers or Contrants on each panel in the notebook make layout
fairly easy.  All in all I think using notebooks is simpler and provide
almost the same effect.

> Also, is it possible to associate a tooltip with each tab?

This I don't know.  You can probably do it for each panel, but it probably
won't popup over the tabs...

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Re: Which Tabbed stuff to use?

Robin Dunn
> >
> > I'm getting confused about which approach to use when designing windows
> > with Tabs.
> >
> > The 'Tab classes overview' describes using wxTabView, wxPanelTabView,
> > wxTabbedPanel, wxTabbedDialog and wxTabControl.  I tried implementing
the
> > example from this overview, and had no luck with wxTabbedDialog.
>
> The Tab classes are not portable and so were not implemented in wxPython
> since wxNotebook is.  I think the reason they are still in the library is
> because wxNotebook is implemented using the Tab classes on some platforms
> that don't have a native notebook control.
>

Hold on,  I just took a closer look and it appears that most of the Tab
classes are generic.  Only wxTabCtrl and wxTabEvent are not implemented for
wxGTK...

I'll add this back to my TODO list...

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users