Re: Another widget_button question [message #6804] |
Thu, 29 August 1996 00:00 |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Volker Groll wrote:
>
> Hi there,
>
> can anybody tell me, how i can check which button is
> pressed on a widget_text or widget_button widget?
> I want to do different things in relation to the
> different mouse buttons.
>
> I'm using IDL Version 4.0 (OSF alpha).
>
> ciao
> volker
>
> --
> Volker Groll
> LMU M"unchen, Institut f"ur Medizinische Optik,
> (Theoretische Biophysik), Theresienstr. 37, 80333 M"unchen
> Raum 204, Tel.: 089 / 23 94 - 41 07
> e-mail: Volker.Groll@physik.uni-muenchen.de
WIDGET_TEXT and WIDGET_BUTTON widgets only return events when
the SELECT button is pressed; you can't use the different
buttons for different functions. What I would suggest, if you
really need this functionality, is to create a "button" that is
really a small WIDGET_DRAW widget with the label drawn in
(maybe using DISP_TXT.PRO or XYOUTS.PRO). Then when you use
one of the buttons within this draw widget, you can determine
which button was pressed, and whether it was pressed or released.
See the on-line documentation for WIDGET_DRAW.
Hope this helps.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2200
La Jolla, CA 92037
[ UCSD Mail Code 0949 ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|