Re: question [message #17043 is a reply to message #15099] |
Thu, 09 September 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Ophir Maor (pro_mao@hmi.de) writes:
> 1. if i have a window and inside i 'm getting some data from the user,
> and then i want put two buttons for o.k. and cancel... how can i do it,
> meaning when presssing o.k. the data will be transfered to the callback
> function of the button 'o.k.'
You want to create what is called a "modal dialog widget".
When the user hits the OK button, collect the information
from the form and store it at a global pointer location. Then
destroy the widget, which releases the modal block (sometimes
just a command line block), allowing you to retrieve the
information from the pointer and return it to the user.
You can read Chapter 13 of my book for all the gritty
details, or just grab some example code off my web page
if you want to learn by doing. You could start with
the GetImage program, for example:
http://www.dfanning.com/programs/getimage.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|