[ltk-user] Example of scrollbar available?

edgar edgar-rft at web.de
Fri Dec 13 07:25:47 UTC 2013


Am Fri, 13 Dec 2013 07:41:07 +0100
schrieb Josef Wolf <jw at raven.inka.de>:

> On Fr, Dez 13, 2013 at 01:31:10 +0100, edgar wrote:
> > After having a closer look at your code it appears to me that
> > this is pretty much nonsense what you're trying there.
> 
> Well, if you try about everything and nothing works, eventually you
> arrive at a point where you even try nonsense :-)

Yes ... I remember ... that's exactly how I learned Tcl/Tk :-)
 
> > A listbox widget is meant to manage _text_ items that are
> > displayed as a vertical list inside the widget.
> 
> Originally, I had a frame with a load of widgets. But as I wrote in my
> previous mail, the frame don't seem to support the yscrollcommand
> option.
> 
> Then I tried scrolled-frame, but this just hangs.
> 
> > What exactly are you trying to achive with this code?
> 
> I have a frame of widgets, which are created dynamically (branches
> and files of a git repository), so chances are they won't fit on the
> screen. So I tried to scroll the frame, but the frame won't support
> the yscrollcommand.
> 

Hierarchical browsers containing text (like file names and git branches)
together with nodes (e.g. little graphics symbols) that can be expanded
and collapsed are usually implemented by text widgets and text markers.

An example how this works can be found in the book
"Effective Tcl/Tk Programming" by Mark Harrison and Michael McLennan:
http://www.amazon.com/Effective-Tcl-Tk-Programming-Programs/dp/0201634740

A picture how this looks like can be found here:
http://incrtcl.sourceforge.net/itcl/mmc/full/catalog.gif

The text browser on the left side contains small black triangles
to expanded and/or collapse the text under the headlines.

Is that what you want?

I have a copy of "Effective Tcl/Tk Programming" and we could try
to re-implement the browser widget in LTK.

- edgar




More information about the ltk-user mailing list