Subject: Re: text widget with horiz and vert scrolling

From: [email-masked] (John Robert LoVerso)
Date: 7 Oct 1994 15:17:39 GMT

[email-masked] (Frank Stajano) writes:
|> |> I've been trying to create a text widget with both horizontal and
|> |> vertical scrolling without much success.
|> 
|> Can't do in Tk 3.6, but it's there in 4.0.

I just love it when people say "Sorry, you can't do it".

This little peice of demo code gives you a horizontal and vertical scrollbar
for a text widget in Tk3.6.

I can think of two ways to implement a horizontal scroll bar for the 3.6
text widget.  One way would be to use the place and vary the -x/-y with
the chosen horizontal position; the other would be to put the text widget
in a canvas and use a horizontal scroll bar for the canvas.

This demo uses the canvas method.

For completeness, I implemented both horizontal and veritcal scanning.
Also, I packed the scrollbars so that that don't overlap (Thanks to
Ioi Kim Lam for the technique).

John