[Tutor] looking for alternatives to tabular widget (Tkinter)

Adrian Maier am@fx.ro
Tue Apr 8 23:49:01 2003


Abel Daniel (abli@freemail.hu) a scris :
> Adrian Maier wrote:
> 
> Not even gtktalog? (http://www.nongnu.org/gtktalog/)
> Looks pretty neat. (Haven't used it, though.)

I didn't know about it. 

> Tkinter itself doesn't have a table widget you need, but others already
> needed such thing, so you might try re-using thier solution. For example
> http://www.novagrid.com/page.php?p=spreadsheet.html
> looks pretty neat. (I never used it.)
> (Another one would be to use Pmw, it has a table-like widget in the
> contrib directory, altough you might need to modify it to allow editing
> the data)
> 
> Of course, you only need a limited set of features (for example the
> number of columns is fixed), so writing your own should be pretty
> strait-forward.
 
> But in this case, why are you using a listbox at all? You aren't using
> any features of a listbox, you could simple create 15 Labels under
> eachother to reach the same effect.

Good point. 

> An other idea would be to use ScrolledFrame from the Pmw widgets.
> With that you could create Labels or Entrys as needed for each piece of
> data, put them into the the ScrolledFrame which would take care of
> scrolling it. I think this is the way the widget in Pmw's contrib dir
> works.

Thank you for the ideas. 

I'll investigate these options. I guess i could also try to use 
a Canvas ? ( there could be a problem with editing, though)


Best wishes,

-- 
Adrian Maier
(am@fx.ro, 0723.002.097)