Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!usc!rutgers!bellcore-2!bellcore!cellar!aw From: aw@cellar.bae.bellcore.com (Andrew Wason) Newsgroups: comp.windows.x Subject: Re: resource lookup problem Message-ID: <27499@bellcore.bellcore.com> Date: 3 Oct 90 18:18:24 GMT References: <1239@cluster.cs.su.oz.au> Sender: news@bellcore.bellcore.com Reply-To: aw@cellar.bae.bellcore.com Organization: Bell Communications Research Lines: 76 In article <1239@cluster.cs.su.oz.au>, john@cluster.cs.su.oz.au (John Mackin) writes: > I have the following resource loaded into my RESOURCE_MANAGER: > > *Scrollbar.Translations: : StartScroll(Backward) \n\ > : StartScroll(Continuous) MoveThumb() NotifyThumb() \n\ > : StartScroll(Forward) \n\ > : MoveThumb() NotifyThumb() \n\ > : NotifyScroll(Proportional) EndScroll() > > This works perfectly under the X11R3 and X11R4 xterms; however, I > recently started trying to use the X11R4 xman, and found that the > scrollbars worked in reverse to what I wanted. I eventually found > that I could work around it by specifying the names of the scrollbars > instead of the class: > > xman*scrollbar.Translations: : StartScroll(Backward) \n\ > : StartScroll(Continuous) MoveThumb() NotifyThumb() \n\ > : StartScroll(Forward) \n\ > : MoveThumb() NotifyThumb() \n\ > : NotifyScroll(Proportional) EndScroll() > xman*vertical.Translations: : StartScroll(Backward) \n\ ^^^^^^^^ I couldn't find any widgets/subwidgets named vertical in xman. > : StartScroll(Continuous) MoveThumb() NotifyThumb() \n\ > : StartScroll(Forward) \n\ > : MoveThumb() NotifyThumb() \n\ > : NotifyScroll(Proportional) EndScroll() The scrollbar in xman is actually a subwidget of a compound widget called ScrollByLineWidget. According to OReilly Vol. 4, you can't directly set the resources of a compound widgets subwidget. However, I tried the following variations of setting the scrollbar subwidgets resources: All four of these worked: xman -xrm "*Scrollbar.foreground: green" xman -xrm "*scrollbar.foreground: green" xman -xrm "xman*scrollbar.foreground: green" xman -xrm "xman*Scrollbar.foreground: green" Neither of these worked: xman -xrm "*Scrollbar.Translations: : StartScroll(Forward) \n\ : NotifyScroll(Proportional) EndScroll()" xman -xrm "*scrollbar.Translations: : StartScroll(Forward) \n\ : NotifyScroll(Proportional) EndScroll()" Both of these worked: xman -xrm "xman*Scrollbar.Translations: : StartScroll(Forward) \n\ : NotifyScroll(Proportional) EndScroll()" xman -xrm "xman*scrollbar.Translations: : StartScroll(Forward) \n\ : NotifyScroll(Proportional) EndScroll()" So, if you aren't allowed to directly access a subwidgets resources, why did all four of the "foreground" resource settings work? Also, why does setting "Translations" work when you specify xman as part of the resource, and fail when you don't? Is there a section of the MIT R4 docs that discusses compound widgets? All I could find was a small section (11.5) in OReilly Vol. 4. Thanks, Andrew -------------------------------------------------------------------------------- Andrew Wason Bell Communications Research aw@cellar.bae.bellcore.com Piscataway, NJ bellcore!cellar!aw