home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!caen!spencer
- From: spencer@med.umich.edu (Spencer W. Thomas)
- Subject: Re: Scrollable buttons?
- Message-ID: <SPENCER.92Nov20155807@guraldi.med.umich.edu>
- Date: Fri, 20 Nov 92 15:58:07 EST
- Organization: University of Michigan
- In-Reply-To: spencer@med.umich.edu's message of Thu, 19 Nov 92 03:18:42 EST
- References: <1992Nov17.102654.15449@dxcern.cern.ch>
- <SPENCER.92Nov19031842@guraldi.med.umich.edu>
- Nntp-Posting-Host: guraldi.itn.med.umich.edu
- Lines: 28
-
- In article <SPENCER.92Nov19031842@guraldi.med.umich.edu> spencer@med.umich.edu (Spencer W. Thomas) writes:
- > - Use winfo reqheight/reqwidth to figure out how big the window will
- > be.
-
- Sigh. I got ahead of myself here. Only some windows get reqheight
- and reqwidth right before they're realized (X technical term). I
- tested it with a label, and it worked. However, a form with a label
- and an entry inside it gives back reqheight/width of 0 until the next
- update. I came up with this, which does work in my application. It's
- better than my previous solution, which stacked all the windows at 0,0
- and then shuffled them to the appropriate final location.
-
- <Create windows, make a list of window names>
-
- update
- # Note that the windows are not visible because they haven't
- # been placed on the canvas yet. But they do have a real
- # height and width now.
-
- foreach w $windowlist {
- <Compute appropriate x/y position>
- canvas create window $x $y -window $w ....
- }
-
- --
- =Spencer W. Thomas | Info Tech and Networking, B1911 CFOB, 0704
- "Genome Informatician" | Univ of Michigan, Ann Arbor, MI 48109
- Spencer.W.Thomas@med.umich.edu | 313-747-2778, FAX 313-764-4133
-