[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Draw widget mouse position error
- Subject: Draw widget mouse position error
- From: "Oliver Smith" <osmith(at)dera.gov.uk>
- Date: Fri, 11 Aug 2000 13:49:27 +0100
- Newsgroups: comp.lang.idl-pvwave
- Organization: Defence Evaluation & Research Agency
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20794
Hi,
I use a draw widget with motion events turned on, I've noticed that a double
click event has a different y-position to a single click event. This is
demonstrable by the code at the bottom of this message. For a double click,
the events returned give:
X Y
Cursor position = 187 110
Cursor position = 187 110
Cursor position = 187 111
Cursor position = 187 110
It is easy to work around the problem by detecting the double click
(event.clicks = 2) and subtracting 1 from event.y
I can recreate the problem on another computer of almost identical
specification to my own. I am using IDL 5.3.1 on NT 4. Can anybody recreate
this bug and on what platforms?
Regards,
Oliver Smith
PRO DRAW_EVENT, event
Print, 'Cursor position = ', Event.x, Event.y
END
PRO ojs
base = Widget_Base(UNAME = 'WID_BASE', SCR_XSIZE=300 ,SCR_YSIZE=200)
draw = Widget_Draw(Base, UNAME = 'WID_DRAW',SCR_XSIZE = 300, SCR_YSIZE =
200, /BUTTON_EVENTS, EVENT_PRO = 'DRAW_EVENT')
Widget_Control, /REALIZE, base
Xmanager, 'WID_BASE', base, /NO_BLOCK
END