Unix Users: Enable IDL Widget Scrolling [message #47063] |
Sun, 22 January 2006 15:40  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
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 [message #47274 is a reply to message #47063] |
Wed, 01 February 2006 10:43  |
nathaniel.cunningham
Messages: 1 Registered: February 2006
|
Junior Member |
|
|
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
|
|
|