@begin(header)
author: Mark S. Ackerman
show_author: ShowNone
author_organization: MIT Center for Coordination Science
node_expert: ackerman=ag@ics.uci.edu
expiration_date: 12/31/93
last_modifier: ackerman@ics.uci.edu
last_mod_date: 08/29/91
mod_num: 2
@end(header)
@begin(Q)
I would like to scroll the child in the viewport widget (Athena widget set)
under program control...
@end(Q)

@begin(A)
This behavior is not supported.
@end(A)



@begin(M)
Subject: Re: Scrolling a Viewport Widget through Software
Date: 31 Jul 89 19:39:17 GMT

>
>     Has anyone figured out how to scroll an athena viewport widget
>from within your program?  I have a list widget that is fairly long
>inside a viewport and would like to be able to type a key and have
>the list widget scroll down automatically to the place in the sorted
>list starting with that letter typed.
>
>     I thought I might be able to use XtScrollbarSetThumb but I don't
>know the widget ID of the actual scrollbar in the viewport.
>

How about the following:
	1.  Use XtGetValues to get XtNwidth and XtNheight for the viewport
	    widget and XtNx and XtNy for the child widget (remembering that
	    then (-x,-y) will be the upper left viewable pixel);
	2.  Use XtNameToWidget(vport_widget, "horizontal") and
	    XtNameToWidget(vport_widget, "vertical") to get the widgets
	    for the horizontal and vertical scrollbars;
	3.  Use XtCallCallbacks(x_bar, XtNscrollProc, x) and
	    XtCallCallbacks(y_bar, XtNscrollProc, y) to set the scrollbars
	    in the desired positions.

I understand that step 2 above is not currently officially blessed, but that
there was some discussion previously about putting the names "vertical"
and "horizontal" in the documentation to make it legit.

--Paul Vojta
@end(M) 
