From paperboy.osf.org!osf.org!loverso Thu Oct 13 09:18:22 1994 Article: 19694 of comp.lang.tcl Path: paperboy.osf.org!osf.org!loverso From: loverso@osf.org (John Robert LoVerso) Newsgroups: comp.lang.tcl Subject: Re: text widget with horiz and vert scrolling Date: 7 Oct 1994 15:17:39 GMT Organization: OSF Research Institute, Cambridge MA Lines: 83 Distribution: world Message-ID: <373oqj$r98@paperboy.osf.org> References: <36u8t6$jgu@usenet.rpi.edu> <370km5$pcu@lyra.csx.cam.ac.uk> NNTP-Posting-Host: coltsfoot.osf.org Keywords: YOU CAN DO IT IN 3.6 fms@cam-orl.co.uk (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