home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / openloo / 3666 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.9 KB

  1. Path: sparky!uunet!ittc!dscott
  2. From: dscott@schlitz.ittc.wec.com (Dave Scott)
  3. Newsgroups: comp.windows.open-look
  4. Subject: Re: Resizing Scrolling Lists
  5. Message-ID: <DSCOTT.92Aug31171540@schlitz.ittc.wec.com>
  6. Date: 31 Aug 92 21:15:40 GMT
  7. References: <23063@hacgate.SCG.HAC.COM>
  8. Sender: news@ittc.wec.com
  9. Organization: Westinghouse - Simulators Division, Pittsburgh, PA
  10. Lines: 50
  11. In-reply-to: harding@maxwell.hrl's message of 28 Aug 92 01:55:29 GMT
  12.  
  13.  
  14. In article <23063@hacgate.SCG.HAC.COM> harding@maxwell.hrl (John Harding) writes:
  15. =>Can someone please explain how to have a Scrolling List resize accordingly
  16. =>when its underlying Control Area is resized.
  17.  
  18. =>I have looked at Dev3.0 and they don't seem to let you do that, even though 
  19. =>they do this in the Dev3.0 connection manager.
  20.  
  21.  
  22. =>Thanks,
  23.  
  24. =>John
  25.  
  26. Try this:
  27.  
  28.     1) Install a resize procedure on the underlying frame through
  29. the connections manager. (mine is usually called
  30. resize_everything_proc() or some such name)
  31.  
  32.     2) Within that resize procedure call xv_get() to retrieve the
  33. current size (new size) of the window.  e.g. within
  34. resize_everything_proc():
  35.  
  36.     new_height = xv_get (ip->base_frame, XV_HEIGHT);
  37.  
  38.     3) Set the height of the scrolled list to be some appropriate
  39. number.  e.g.:
  40.  
  41.     xv_set (ip->my_scrolled_list,
  42.         XV_HEIGHT,
  43.         new_height - xv_get(ip->my_scrolled_list,XV_Y) - 20,
  44.         NULL);
  45.  
  46. The scrolled list <my_scrolled_list> will be anchored at the top, you
  47. are just setting the height to be from the anchored position to 20
  48. pixels from the bottom (basically full height).
  49.  
  50. The changes will be seen almost immediately.
  51.  
  52. After playing with it a little, you can most certainly get exactly the
  53. size and behavior you would like.
  54.  
  55. Hope this helps,
  56.  
  57. -dave
  58.  
  59. --
  60.  David A. Scott - das@ils.com   -OR-   dscott@ittc.wec.com (Westinghouse)
  61.  interLogic Software, Inc.             "The shortest distance between
  62.  (Currently on loan to Westinghouse)      two points is under construction."
  63.