home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!wupost!spool.mu.edu!agate!ygdrasil.CS.Berkeley.EDU!faustus
- From: faustus@ygdrasil.CS.Berkeley.EDU (Wayne A. Christopher)
- Newsgroups: comp.lang.tcl
- Subject: Re: Scrollable buttons?
- Date: 17 Nov 1992 19:15:39 GMT
- Organization: University of California, Berkeley
- Lines: 25
- Message-ID: <1ebgcrINNmt7@agate.berkeley.edu>
- References: <1992Nov17.102654.15449@dxcern.cern.ch> <1992Nov17.151657.3467@cis.ohio-state.edu>
- NNTP-Posting-Host: ygdrasil.cs.berkeley.edu
-
- In article <1992Nov17.151657.3467@cis.ohio-state.edu> mdm@stegosaur.cis.ohio-state.edu (Michael Moore) writes:
-
- [ A bunch of code to make a frame with a canvas and a scrollbar... ]
- > for {set i 0} {$i < 25} {incr i} {
- > button .frame.canvas.button$i \
- > -relief raised \
- > -text "Button $i"
- > .frame.canvas create window 40 [expr $i*25] \
- > -window .frame.canvas.button$i
- > }
-
- The problem here is that you have to know the size of the buttons
- beforehand. Could you do the following? (I haven't tried it but I
- will.)
-
- - make a canvas with a scrollbar
- - put a frame somewhere in the canvas
- - pack all the buttons in the frame
- - see how big the frame is
- - set the canvas scroll region appropriately
-
- Has anybody written a scrolled frame? That ought to be an easy widget
- to write. (I know, why don't I write it...)
-
- Wayne
-