home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / tcl / 1756 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.1 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!rutgers!psuvax1!schwartz
  2. From: schwartz@roke.cs.psu.edu (Scott Schwartz)
  3. Newsgroups: comp.lang.tcl
  4. Subject: mixing fixed and variable components with the placer
  5. Message-ID: <BxBEBz.K6z@cs.psu.edu>
  6. Date: 6 Nov 92 21:56:57 GMT
  7. Sender: news@cs.psu.edu (Usenet)
  8. Distribution: comp
  9. Lines: 16
  10. Nntp-Posting-Host: roke.cs.psu.edu
  11.  
  12.  
  13. Consider the following code fragment:
  14.  
  15. frame .frame -borderwidth 10 -geometry 700x100
  16. place [scrollbar .frame.scroll -relief sunken -command ".frame.list yview"] \
  17.     -in .frame -width 20 -relheight 1.0
  18. place [listbox .frame.list -yscroll ".frame.scroll set" -relief sunken \
  19.         -geometry 80x10 ] \
  20.     -in .frame -x 20 -relheight 1.0 -relwidth 0.97
  21.  
  22. This puts a scrollbar and a listbox in a frame using the placer.  One
  23. really unsightly feature is the ``-relwidth 0.97'' on the listbox.
  24. There doesn't seem to be a clean way to ask the placer to let an
  25. object fill the remaining space.  Because I want the scrollbar to be
  26. fixed width, no relwidth for the listbox will be correct.  Because the
  27. frame can change size, no fixed width will be correct.  What to do?
  28.