Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Ever wished you could use that mouse scroll wheel or ball on IDL widgets? IDL users of MacOSX/Unix can enable this ever so useful functionality with a bit of Motif X resource hackery. Simply add: *XmList.baseTranslations: #augment Shift<Btn5Down>: ListNextItem()\n\ Shift<Btn4Down>: ListPrevItem()\n\ <Btn5Down>: ListNextPage()\n\ <Btn4Down>: ListPrevPage()\n *XmScrollBar.baseTranslations: #augment <Btn4Down>: IncrementUpOrLeft(0) IncrementUpOrLeft(1)\n\ <Btn5Down>: IncrementDownOrRight(0) IncrementDownOrRight(1)\n *XmText.baseTranslations: #augment Shift<Btn4Down>: page-left()\n\ Shift<Btn5Down>: page-right()\n\ <Btn4Down>: scroll-one-line-up()\n\ <Btn5Down>: scroll-one-line-down()\n to your ~/.Xdefaults file, restart X11 and IDL, and scroll away on lists and text widgets. Those random back slashes and newline commands aren't line noise, they need to be included. In IDL widget lists, scroll does page up/down, whereas shift-scroll moves the "dotted" selection by one. When the mouse is over the scrollbar itself, the scroll wheel moves a line at a time. Text widgets are similar. If anyone at RSI is listening, something like this would be a very good addition to the "$IDL_DIR/idl/resource/X11/lib/app-defaults/Idl" default X preferences file. JD
Re: Unix Users: Enable IDL Widget Scrolling
Thanks for the tip! I've been wanting this for ages. For some reason, Shift doesn't work as a scroll modifier for me under OS X (10.4.4). I changed all instances of 'Shift' to 'Ctrl' and that works fine. Also, I found my up/down scrolling was reversed in text widgets, so I interchanged <Btn4Down> and <Btn5Down> in the last two lines of your .Xdefaults code Cheers, Nathaniel
In article <pan.2006.01.22.23.40.35.225522@as.arizona.edu>, JD Smith <jdsmith@as.arizona.edu> wrote: > > to your ~/.Xdefaults file, restart X11 and IDL, and scroll away on lists > and text widgets. Those random back slashes and newline commands aren't > line noise, they need to be included. > Thanks for these tips. If people don't want to restart X11, they can run xrdb -merge ~/.Xdefaults from a command prompt and these changes should take affect. I assume OS X has xrdb too but am not positive. --Mike -- Michael Chinander m-chinander@uchicago.edu Department of Radiology University of Chicago