sec : U Re: Mouse Wheel [message #29631] |
Sun, 03 March 2002 15:48  |
Andrew Cool
Messages: 219 Registered: January 1996
|
Senior Member |
|
|
OK,
More playing around reveals that putting sliders in different bases
prevents unwanted interaction.
Andrew C.
e.g. :-
PRO slider_Demo_event, ev
widget_control,ev.id,get_Uvalue= uv
Case uv OF
'CT SLICE' : Begin
CT_slice = ev.value
print,'CT_slice = ',CT_slice
End
'CT CONTRAST' : Begin
CT_contrast = ev.value
print,'CT_Contrast = ',CT_Contrast
End
'DRAW' :
'JUNK' :
'EXIT' : Widget_Control,ev.top,/Destroy
Else : Message,'Dodgy Uvalue = ' + STRING(uv)
End
End
;........................................................... .......
PRO Slider_Demo
base = Widget_base(/row,Xsize=600)
basea = Widget_base(base,/Col,/Frame)
basec = Widget_base(base,/Col,/Frame)
baseb = Widget_base(base)
based = widget_base(base)
slice_slider_id = Widget_slider(basea,Min=0,max=128,Title='CT slice',$
Value=64,Uvalue='CT SLICE',/Frame)
contrast_slider_id = Widget_slider(basec,Min=0,Max=255,Title='CT
Contrast',$
Value=40,Uvalue='CT
CONTRAST',/Frame,/Vert)
exit_id = Widget_button(basea,Value='EXIT',Uvalue='EXIT')
draw_id = Widget_draw(baseb,xsize=300,ysize=300,/motion,Uvalue='DRAW')
junk_id = Widget_button(based,value='JUNK',Uvalue='JUNK')
Widget_control,base,/Real
Xmanager,'Slider_Demo',base
End
Andrew Cool wrote:
>
> Joshua Nipper wrote:
>>
>> Is there any documentation on how to control the mouse wheel in IDL better?
>> Currently, I have several sliders and droplists. If I have the mouse over
>> them, the mouse wheel will scoll them. But if the mouse cursor is not over
>> the slider, it alters other sliders which is a pain. I want the whell to
>> control one slider in particular (the current slice in a CT data set)
>> Thanks!
>> Josh
>
> Hi Josh,
>
> After playing around with Tracking Events and
> Sensitising/De-sensitising
> slider widgets, I don't think that's the way to go.
>
> However, I altered the properties of my Logitech wheelmouse's scroll
> wheel from "click/select" to "horizontal scroll", and Voila!, on a test
> GUI with a vertical and horizontal slider, only one slider would
> respond
> to the wheel button, whilst the other had to be clicked on as per
> normal.
> Setting the whell button property to "vertical scroll" had the expected
> opposite effect, in that the other slider responded to the wheel, etc.
>
> Not exactly platform or user independent though.
>
> I seem to recall a recent post from one of the IDL Guri saying that he
> was in the process of creating a DLM for mouse control. A search on
> that
> might prove fruitful.
>
> HTH,
>
> Andrew
>
> ------------------------------------------------------------ ---------
> Andrew D. Cool .->-.
> Electromagnetics & Propagation Group `-<-'
> Surveillance Systems Division Transmitted on
> Defence Science & Technology Organisation 100% recycled
> PO Box 1500, Salisbury electrons
> South Australia 5108
>
> Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
> Email : andrew.cool@dsto.defence.gov.au
> ------------------------------------------------------------ ---------
--
------------------------------------------------------------ ---------
Andrew D. Cool .->-.
Electromagnetics & Propagation Group `-<-'
Surveillance Systems Division Transmitted on
Defence Science & Technology Organisation 100% recycled
PO Box 1500, Salisbury electrons
South Australia 5108
Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ ---------
|
|
|