Re: window events [message #7352] |
Mon, 11 November 1996 00:00 |
FERN
Messages: 1 Registered: November 1996
|
Junior Member |
|
|
Hello Phil, you wrote
> I'm in the process of building a widget application and want to open
> some auxialliary windows for plotting and displaying images. Is there a
> way to get the mouse events that occur in these windows? If so, how do
> I do it?
>
> Thanks in advance,
> Phil
>
> --
> /*********************************************************** ********/
> Phil Williams, Ph.D.
> Research Instructor
> Children's Hospital Medical Center "One man gathers what
> Imaging Research Center another man spills..."
> 3333 Burnet Ave. -The Grateful Dead
> Cincinnati, OH 45229
> email: williams@irc.chmcc.org
> URL: http://scuttle.chmcc.org/~williams/
> /*********************************************************** ********/
>
Here's is a very simple example:
base1 = WIDGET_BASE(....) ;your main base
...
..
base2 = WIDGET_BASE(....,GROUP_LEADER=base1) ;your auxialliary base that
will ; contain the plotting windows
draw = WIDGET_DRAW(base2,.....) ;your draw widget
...
...
base3 = WIDGET_BASE(....,GROUP_LEADER=base1) ;Another auxialliary base
....
....
;**** in your event handling loop use:
event = WIDGET_EVENT([base1,base2,base3],....)
;**** This will monitor all events coming from the bases including the
plotting ; window in your draw widget. To get the info of which
; base it come from use "event.top". When you destroy base1, the rest will
; follow
This should be a good enough start
Good Luck
************************************************************ ***************
*
_ \|/ _ Fernando Meo
/ \ | / \ CCFM, IREQ
CIAO _ \|/ _ 1804 Lionel Boulet
Fern.... / \ | / \ Varennes, Quebec
\|/ J3X 1S1, Canada
__|__ Tel: (514) 652-8719
\___/ Fax: (514) 652-8625
\_/ E-mail: MEO@ccfm.ireq.ca
************************************************************ ***************
|
|
|