comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Unix Users: Enable IDL Widget Scrolling
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Unix Users: Enable IDL Widget Scrolling [message #47063] Sun, 22 January 2006 15:40 Go to next message
JD Smith is currently offline  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 #47273 is a reply to message #47063] Wed, 01 February 2006 10:50 Go to previous message
mchinand is currently offline  mchinand
Messages: 66
Registered: September 1996
Member
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
Re: Unix Users: Enable IDL Widget Scrolling [message #47274 is a reply to message #47063] Wed, 01 February 2006 10:43 Go to previous message
nathaniel.cunningham is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Fitting an ROI to a distribution of points
Next Topic: staying away from color indices 0, and 255?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 09:54:51 PDT 2025

Total time taken to generate the page: 0.80174 seconds