[Tutor] Creating Table using Tkinter
Michael P. Reilly
arcege@speakeasy.net
Thu, 28 Jun 2001 07:58:24 -0400 (EDT)
Daxesh Patwa wrote
> Any help on how to creat a table using Tkinter.
>
> My problem :
>
> I am developing a GUI, using Tkinter. I want to display differnet =
> choices in a list box,which user can scroll in to and choose one of the =
> displayed list.
>
> But as I know I can display only one choice per row of the list and I =
> cant have multiple elements on the same row.
>
> If I can create table with more then one column, I may be able to =
> display all these columns.(That is what I am guessing)
>
> Any other work around or pointer for this problem will be quite helpful.
The scrolling is the difficult part. A Frame widget is not scrollable,
and for the most part, scrolling works with a single widget. But you
can get it to work.
One suggestion (sorry that I can't really put up tested code, not really
feeling well) would be to get a list of listbox objects, create a callback
for Scrollbar that distributes the scrolling across the list.
I did this once, but can't find the code unfortunately. I seem to
remember that it didn't really work well.
If you are attempting to make a clickable table, then you might think
about using the Text widget and tag_bind, with a fixed font (like
Courier).
Good luck,
-Arcege
--
+----------------------------------+-----------------------------------+
| Michael P. Reilly | arcege@speakeasy.net |