[Tutor] Multiple tabs using tkinter

Zachary Ware zachary.ware+pytut at gmail.com
Mon Feb 6 22:31:01 EST 2017


On Mon, Feb 6, 2017 at 7:31 PM, Alan Gauld via Tutor <tutor at python.org> wrote:
> On 06/02/17 16:40, Pooja Bhalode wrote:
>
>> I was wondering if someone could help me regarding multiple tabs in
>> tkinter.
>
> Look at the tabbed notebook in the Tix module.
> It should do what you want.

ttk rather than Tix; Tix is unmaintained and soft-deprecated in 3.6+.
ttk provides most of the useful parts of Tix, is maintained as part of
Tk, and also looks significantly more native than classic Tk or Tix.
Tix is also less available on platforms other than Windows, whereas
ttk is present in any Tk 8.5 or greater.

> I give a tutorial on its use in my recent book but you can
> also find online tutorials, especially in Tcl (Python ones
> are much harder to find)
>
>> Also, I was wondering if there is a way in tkinter to create an explorer
>> bar that we see in finder in OS Mac or windows. I found a way to do that
>> using wxpython, but was wondering if there is a way using tkinter.
>
> Tkinter is a relatively low level GUI toolkit. You can
> build most things but you have to start with the basic
> widgets. So an explorer bar is just an Entry widget to
> which you can attach any functionality you care to create.

Also have a look at ttk.Combobox, which combines an Entry and Listbox
(and, I think, if the list is long enough, a Scrollbar) into a
drop-down menu widget.

-- 
Zach


More information about the Tutor mailing list