[comp.windows.open-look] Get a handle to a splitted Canvas Scrollbar

etxmwe@solsta.ericsson.se (Martin Wennberg TX/DKF) (02/12/91)

I have a problem to get a handle to a splitted Scrollbar attached to
a Canvas.

I'm able to get a handle to the "original" Scrollbar with:
xv_get(canvas, OPENWIN_VERTICAL_SCROLLBAR, 0).
Even though I get an Error message.

But there is no way I can do anything with the 2'nd Scrollbar, attached
to the 2'nd view of the splitted Canvas.

Is there anyone who have a solution to this problem???


Best regard

Martin Wennberg

dmaustin@vivid.sun.com (Darren Austin) (02/13/91)

In article <1991Feb12.141016.10006@ericsson.se> etxmwe@solsta.ericsson.se (Martin Wennberg TX/DKF) writes:

>   I have a problem to get a handle to a splitted Scrollbar attached to
>   a Canvas.

>   I'm able to get a handle to the "original" Scrollbar with:
>   xv_get(canvas, OPENWIN_VERTICAL_SCROLLBAR, 0).
>   Even though I get an Error message.

>   But there is no way I can do anything with the 2'nd Scrollbar, attached
>   to the 2'nd view of the splitted Canvas.

>   Is there anyone who have a solution to this problem???

Yes.  The correct method for getting the scrollbar from a canvas is:

	sb = xv_get(canvas, OPENWIN_VERTICAL_SCROLLBAR, view);

Where view is the handle to the view window whose scrollbar you
are looking for.  You can get a handle to the 2nd view with the
following:

	view = xv_get(canvas, OPENWIN_NTH_VIEW, 1);

--Darren

--
Darren Austin                         |  Actually, it's a buck and a quarter
Windows and Graphics Software	      |  staff, but I'm not going to tell
Sun Microsystems, Mountain View       |  *him* that.
dmaustin@sun.com	              |