home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ittc!dscott
- From: dscott@schlitz.ittc.wec.com (Dave Scott)
- Newsgroups: comp.windows.open-look
- Subject: Re: Resizing Scrolling Lists
- Message-ID: <DSCOTT.92Aug31171540@schlitz.ittc.wec.com>
- Date: 31 Aug 92 21:15:40 GMT
- References: <23063@hacgate.SCG.HAC.COM>
- Sender: news@ittc.wec.com
- Organization: Westinghouse - Simulators Division, Pittsburgh, PA
- Lines: 50
- In-reply-to: harding@maxwell.hrl's message of 28 Aug 92 01:55:29 GMT
-
-
- In article <23063@hacgate.SCG.HAC.COM> harding@maxwell.hrl (John Harding) writes:
- =>Can someone please explain how to have a Scrolling List resize accordingly
- =>when its underlying Control Area is resized.
-
- =>I have looked at Dev3.0 and they don't seem to let you do that, even though
- =>they do this in the Dev3.0 connection manager.
-
-
- =>Thanks,
-
- =>John
-
- Try this:
-
- 1) Install a resize procedure on the underlying frame through
- the connections manager. (mine is usually called
- resize_everything_proc() or some such name)
-
- 2) Within that resize procedure call xv_get() to retrieve the
- current size (new size) of the window. e.g. within
- resize_everything_proc():
-
- new_height = xv_get (ip->base_frame, XV_HEIGHT);
-
- 3) Set the height of the scrolled list to be some appropriate
- number. e.g.:
-
- xv_set (ip->my_scrolled_list,
- XV_HEIGHT,
- new_height - xv_get(ip->my_scrolled_list,XV_Y) - 20,
- NULL);
-
- The scrolled list <my_scrolled_list> will be anchored at the top, you
- are just setting the height to be from the anchored position to 20
- pixels from the bottom (basically full height).
-
- The changes will be seen almost immediately.
-
- After playing with it a little, you can most certainly get exactly the
- size and behavior you would like.
-
- Hope this helps,
-
- -dave
-
- --
- David A. Scott - das@ils.com -OR- dscott@ittc.wec.com (Westinghouse)
- interLogic Software, Inc. "The shortest distance between
- (Currently on loan to Westinghouse) two points is under construction."
-