home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!ucla-cs!oahu.cs.ucla.edu!andylee
- From: andylee@oahu.cs.ucla.edu (Andy Lee)
- Subject: Problem between Canvas Text and Scrollbar
- Message-ID: <1992Jul22.194933.12237@cs.ucla.edu>
- Sender: usenet@cs.ucla.edu (Mr Usenet)
- Nntp-Posting-Host: oahu.cs.ucla.edu
- Organization: UCLA, Computer Science Department
- Date: Wed, 22 Jul 92 19:49:33 GMT
- Lines: 44
-
- Hello,
-
- I am new to this group, forgive me if this problem has been discussed
- already. The 'problem' is between a canvas containing text and a
- vertical scrollbar. Here is a small wish script that demonstrates the
- problem:
-
- ---------- Scripts Starts Here 8< ----------
-
- #!wish -f
- #
- # Problem between canvas text and vertical scroll bar
- #
-
- # Create a scroll bar and a canvas
- pack append . \
- [scrollbar .scrollbar -command ".canvas yview"] {left filly} \
- [canvas .canvas -yscrollcommand ".scrollbar set"] {left expand}
-
- # Write 100 lines of canvas text
- set canvastext [.canvas create text 0 0 -anchor nw -justify left \
- -text "Canvas Test:\n"]
- for {set i 1} {$i <= 100} {incr i} {
- .canvas insert $canvastext end "Line $i\n"}
-
- ---------- Script Ends Here 8< ----------
-
- The initial scrollbar slider occupides the entire scroll space, but as
- soon as I press the lower arrow, the slider becomes just a small line.
- And the arrows let me scroll past the text (either above or below),
- which is not desirable.
-
- Any help is greatly appreciated...
-
-
-
-
-
-
- --
- Andy A. Lee UCLA MS Graduate Student, AI Neural Networks
- andylee@cs.ucla.edu Down-to-Earth Idealist & Independent NeXT Developer
- (310)824-7131 "If you don't watch your figure, who will?" - TV Ad.
- (310)208-0200 "Trust is earned, not given away." - Star Trek: TNG
-