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.open-look Subject: Re: Controlling scrolling with views Message-ID: Date: 21 Feb 91 06:51:40 GMT References: Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems, Mountain View Lines: 39 In-reply-to: fgreco@govt.shearson.com's message of 20 Feb 91 19:44:13 GMT In article fgreco@govt.shearson.com (Frank Greco) writes: Since SCROLLABLE_PANELS are OPENWINs, I would think that the following would get the view's scrollbar in my split_proc(): [called whenever the user splits a view] split_proc(origview, newview, pos) Xv_Window origview, newview; int pos; { Scrollbar sbar; sbar = xv_get(newview, OPENWIN_VERTICAL_SCROLLBAR); ...other stuff... notify_interpose_event_func(xv_get(sbar, SCROLLBAR_NOTIFY_CLIENT), doscroll, NOTIFY_SAFE); } But I get a zero for sbar everytime. Anyone got any ideas why this doesn't work? Yes. You should be trying the following to get the view's scrollbar: sbar = (Scrollbar)xv_get(xv_get(newview, XV_OWNER), OPENWIN_VERTICAL_SCROLLBAR, newview); If you already have a handle to the scrollable panel, then you can use that instead of the xv_get(newview, XV_OWNER). Hope this helps, --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 |