Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ntvax!iex!neptune!roy From: roy@neptune.iex.com (Roy Cantu) Newsgroups: comp.windows.x Subject: Grabbing the AsciiWidget scrollbar. HELP. Message-ID: Date: 19 Jul 90 17:53:40 GMT Sender: news@iex.uucp (USENET news) Distribution: comp Organization: IEX Corporation Lines: 47 The Text widget allows for optional vertical and horizontal scrollbars. It handles the callbacks itself without bothering the user about scrollProcs and jumpProcs. This is all very nice as long as the user is satisfied with what these scrollbars look like and do. My application wants to "grab" these scrollbars so that it may manipulate them while still taking advantage of the Text widget and without having to introduce any cumbersome ScrollbarWidgets. I mean, who wants to write a jump and scroll Proc when the Text widget already provides it? Specifically, my application would like to receive events whenever the scrollbar is moved and sometimes (not the majority of the time) set the scrollbar thumb itself. I tried to accomplish this with the following (stripped down) function. AsciiTextScroll(widget) AsciiWidget widget; { Widget v_bar; v_bar = XtNameToWidget(widget, "vScrollbar"); XawScrollbarSetThumb(v_bar, 0.5, -1.0); } This looks good on paper to me, but when I check to see if v_bar has a value, it turns out to be NULL. Obviously not a good sign. The inspiration for the name to widget argument "vScrollbar" comes from line 380 of Text.c. I have also tried "vbar" instead of "vScrollbar", but to no avail. Theoretically, if I ever can grab this vertical scrollbar, I can set my own callback functions when necessary and set them back to the Text widget callbacks when I am done. Any suggestions or better ways of doing this will be greatly appreciated. I hate to keep bugging people about this, but it is REALLY important. roy cantu