Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!is.Morgan.COM!jerryl From: jerryl@is.Morgan.COM (Jerry Liebelson) Newsgroups: comp.windows.x.motif Subject: Re: Freezing the Scrollbar Message-ID: <9106242251.AA24541@24541> Date: 24 Jun 91 22:47:05 GMT References: <910624112739.244@sony> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 61 > > > ------- > > I need to find out if there is any way to temporarily turn off scrollbar > > processing. I have an application where it may sometimes take a while > > This sounds like a good candidate for sending an enhancement request > to OSF. In the meantime I suspect your best bet is to unmap the scrollbar > and hope that it doesn't get to annoying. (This appears to be what the > FileSelection Dialog does in 1.1). > Actually, we had to do something similar because we wanted to store hidden data in each row of a XmList but not have the users be able to scroll and see it. The key to doing this is simple, though VERY KLUDGY: Just get the particular scrollbar from the widget, make it insensitive and invisible: (On monochrome SLC's this code is still missing something, because a faint, partial outline of the scrollbar remains; but on color displays, the scrollbar is completely invisible.) /* ... */ register int i; Arg argList[10]; Widget list; /* an XmList */ Widget listContainerWidget; /* a widget containing the XmList */ Widget hScrollBar; Pixel bg; /* Get the horizontal scrollbar of the XmList */ i=0; XtSetArg (argList[i], XmNhorizontalScrollBar, &hScrollBar); i++; XtGetValues (list, argList, i); /* Get the background color of the widget containing the XmList */ i=0; XtSetArg (argList[i], XmNbackground, &bg); i++; XtGetValues (listContainerWidget, argList, i); /* Make the scrollbar invisible */ i=0; XtSetArg (argList[i], XmNsensitive, False); i++; XtSetArg (argList[i], XmNbackground, bg); i++; XtSetArg (argList[i], XmNforeground, bg); i++; XtSetArg (argList[i], XmNtroughColor, bg); i++; XtSetArg (argList[i], XmNshadowThickness, 0); i++; XtSetArg (argList[i], XmNhighlightThickness, 0); i++; XtSetArg (argList[i], XmNbottomShadowColor, bg); i++; XtSetArg (argList[i], XmNtopShadowColor, bg); i++; XtSetValues (hScrollBar, argList, i); /* ... */ -- |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| | Jerry Liebelson | EMAIL: jerryl@is.morgan.com | | Information Systems | uunet!is.morgan.com!jerryl | | Morgan Stanley & Co., Inc. | Compuserve: 73477,2740 | | 1633 Broadway 36th Floor | VOICE: (212) 703-2409 | | New York, NY 10019 | FAX: (212) 703-2371 | | | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~