[Tkinter-discuss] TkTable changing the entry widgets

Guilherme Polo ggpolo at gmail.com
Thu Jan 1 04:34:48 CET 2009


On Wed, Dec 31, 2008 at 7:10 PM, Troy Taillefer <ironwaist29 at yahoo.com> wrote:
> Hi all,
>
> I was wondering if anyone knew who to change the entry widgets in TkTable to
> replace them with a custom entry widget like AutoCompletionEntry
> http://tkinter.unpythonic.net/wiki/AutocompleteEntry or ValidatingEntry
> http://tkinter.unpythonic.net/wiki/ValidateEntry.

I would suggest embedding these widgets, and others, instead of trying
to replace the default behaviour of a cell entry in tktable.
Embedding is easy enough given your tktable python wrapper has the
window commands wrapped:

import Tkinter
import tktable

table = tktable.Table()
table.window_configure("2,3", window=Tkinter.Entry())
table.pack()

table.mainloop()

I'm using Tkinter.Entry here, but you could just as well use this
AutoCompleteEntry widget. This "2,3" is the cell index -- third row,
fourth column.
The wrapper I used there can be found at XXX (forgot the link, it is
on http://tkinter.unpythonic.net/wiki but the wiki is inaccessible
now) and also in tktable's cvs since about 1-2 month(s) ago (except
that the one in cvs doesn't yet have the latest updates).

> Also if anyone knows how
> to enhance TkTable to do column sorting or point me to some good links it
> would be greatly apreciated thanks.
>

It is a matter of reorganizing the ArrayVar associated to the table
since tktable doesn't have a built-in sort yet. Have you tried doing
anything like this ?

> Troy



-- 
-- Guilherme H. Polo Goncalves


More information about the Tkinter-discuss mailing list