Re: How to get windows id or title by clicking on it [message #66881] |
Thu, 18 June 2009 21:12  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeanphi62 writes:
> With
>
>
> tlb = widget_base(title="mywindow", MBAR=mbar, /col, $
> event_pro='test_function')
>
>
>
> and
>
>
>
> pro test_function, event
> print, "hello"
> end
>
>
>
> There is no "hello" printed when I click on the widget_base...
Well, if this is your code, you don't have any events turned
on for the base widget! ;-)
This code will generate events.
pro test_tlb_events, event
thisEvent = tag_names(event, /structure_name)
Print, thisEvent
end
pro test
tlb = widget_base(title="mywindow", MBAR=mbar, /col, $
/tlb_size_events, $
/tlb_move_events, $
/tlb_kill_request_events)
draw = widget_draw(tlb, xsize=400, ys=400)
widget_control, tlb, /realize
xmanager, 'test', tlb, /no_block, event_handler='test_tlb_events'
end
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|