Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!dmaustin From: dmaustin@vivid.sun.com (Darren Austin) Newsgroups: comp.windows.x Subject: Re: Get handle to a splitted Canvas Scrollbar??? Message-ID: Date: 14 Feb 91 08:24:00 GMT References: <9102132013.AA07452@marvin.pbi.com> Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems, Mountain View Lines: 46 In-reply-to: rick@pbi.COM's message of 13 Feb 91 20:13:20 GMT In article <9102132013.AA07452@marvin.pbi.com> rick@pbi.COM (Richard M. Goldstein) writes: [quoting someone else's question] > > xv_get(canvas, OPENWIN_NTH_VIEW, 0) > > xv_get(canvas, OPENWIN_VERTICAL_SCROLLBAR) > > > > But it is impossible to get in touch with the second Scrollbar. > > have you tried getting the OPENWIN_VERTICAL_SCROLLBAR on the nth view > (not the 0th view)? try this: > > /* > * get scrollbar attached to first view > */ > view = (Xv_Window)xv_get ( canvas, OPENWIN_NTH_VIEW, 1 ); > scrollbar = (Scrollbar)xv_get ( canvas, OPENWIN_VERTICAL_SCROLLBAR ); Close, bug no cigar ;-). This should read: view = (Xv_Window)xv_get ( canvas, OPENWIN_NTH_VIEW, 1 ); scrollbar = (Scrollbar)xv_get ( canvas, OPENWIN_VERTICAL_SCROLLBAR, view ); > to traverse a hierarchy of views, try: > > OPENWIN_EACH_VIEW(canvas, view) > scrollbar = xv_get( view, OPENWIN_VERTICAL_SCROLLBAR ); > /* do whatever with scrollbar */ > OPENWIN_END_EACH Close again, but... this should be: OPENWIN_EACH_VIEW(canvas, view) scrollbar = xv_get( canvas, OPENWIN_VERTICAL_SCROLLBAR, view ); /* do whatever with scrollbar */ OPENWIN_END_EACH Hope this helps clear up some confusion...clear as mud, right ;-)? Later, --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 |