[comp.windows.x.motif] scrollbar workwindow movement

david@lta.com (David B. Lewis) (11/13/90)

In article <316@pcad.UUCP>, uunet!pcad!eddy  (Eduardo Juncosa) writes:
|> I am setting the position of the scrollbar (with XmScrollBarSetValues) and the
|> scrollbar changes to look like I want it to, but this does not cause the "work"
|> window to change.  Since the coordinates of the "work" window were not being
|> reset (they are for manual scrolls), I also tried resetting the coordinates of
|> the "work" window, but it made no difference.

I coincidentally just took a look at this for another reason, and this solution
(not confirmed by me) for use with Motif 1.0 suggested itself: when the scrollbars are moved, the ScrolledWindow's internal callbacks are calling 
the internal function _XmMoveObject with the arguments of the workWindow widget,
(vertical) 
the workWindow widget`s XmNx position, and the -offset of the amount to be moved;
(horizontal)
the -offset of the amount to be moved, and the workWindow widget`s XmNy position.

The callbacks then set either the scrolledWindow's internal hOrigin or vOrigin
value to that offset, in the appropriate case.

It appears that you can reconstruct these two lines in application code and call
them in addition to setting the scrollbar values.

If you have source, check XmGadgetUtil.c.

-- 
David B. Lewis  			Lewis, Trachtenberg & Associates (LTA)
					+1 617 225 0366
Note new address!:	david@lta.com 			(Real Soon Now)
			david@lta.UUCP			(Right Now)
			david%lta.uucp@uunet.uu.net	(Works for Now)