Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!sdd.hp.com!hp-pcd!hpcvlx!bobm From: bobm@hpcvlx.cv.hp.com (Bob May) Newsgroups: comp.windows.x.motif Subject: Re: Scrolled Window: Area Size Message-ID: <110630035@hpcvlx.cv.hp.com> Date: 20 Feb 91 16:42:01 GMT References: <1991Feb19.213852.3289@csrd.uiuc.edu> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 19 > I have a Scrolled WIndow with a scrollingPolicy of AUTOMATIC and a > scrollBarDisplayPolicy of AS_NEEDED. The work area of this Widget is a > Drawing Area. What I need to do is to determine, at arbitrary times, the > exact rectangular regtion of the Drawing Area that is visible thru the > viewing area of the Scrolled Window. This means I need the width and height > of this viewing area as well as the coordinates of the Drawing Area that > appear. > Is there a nice way to determine this info ? Try getting the widget ID contained in the Scrolled Window's XmNclipWindow resource, then do a GetValues on the width and height of that widget. Should be just what you need. Bob May Hewlett-Packard Interface Technology Operation bobm@hpcvlx.cv.hp.com