Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ttk Listbox

28 views
Skip to first unread message

Ric@rdo

unread,
Oct 31, 2011, 12:37:01 AM10/31/11
to

What would be an equivalent widget in ttk like a Listbox and if
possible a small example? I tried to look here
http://docs.python.org/library/ttk.html but did not see anything.

Maybe I did not look in the right place?

tia

user1024

unread,
Oct 31, 2011, 6:00:26 AM10/31/11
to
hi
http://www.tkdocs.com/tutorial/index.html

remember that you have to import line
from tkinter import ttk
(at "from tkinter import *" ttk in not included)

user1024

unread,
Oct 31, 2011, 6:01:42 AM10/31/11
to
hi
http://www.tkdocs.com/tutorial/index.html

remember that you have to import like

autofelge

unread,
Oct 31, 2011, 6:05:35 AM10/31/11
to

autofelge

unread,
Oct 31, 2011, 6:07:07 AM10/31/11
to

user1024

unread,
Oct 31, 2011, 6:10:53 AM10/31/11
to

Kevin Walzer

unread,
Oct 31, 2011, 10:00:22 AM10/31/11
to
The listbox isn't part of the themed ttk widgets. The ttk::treview is,
and that can be set up as a single-column list display. There may be an
example of how to do this in the docs or source code tree (I don't use
the widget myself so I don't have any sample code to share).

--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

Ric@rdo

unread,
Oct 31, 2011, 3:34:26 PM10/31/11
to
On Mon, 31 Oct 2011 10:00:22 -0400, Kevin Walzer <k...@codebykevin.com>
wrote:
Thank you for the information.

Ric@rdo

unread,
Oct 31, 2011, 4:03:58 PM10/31/11
to
On Mon, 31 Oct 2011 10:00:22 -0400, Kevin Walzer <k...@codebykevin.com>
wrote:

Quick question:

Then why is it mentioned here
http://www.tkdocs.com/tutorial/morewidgets.html?

Listboxes are created using the Listbox function:

l = Listbox(parent, height=10)

Kevin Walzer

unread,
Oct 31, 2011, 8:00:13 PM10/31/11
to
The listbox is a Tk widget, not a ttk widget. It's one of the original
Tk/Tkinter widgets, and has no themed equivalent.
0 new messages