Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: single_entry_dialog_box.delete - Function Up: single_entry_dialog_box - Tool Previous: single_entry_dialog_box - Tool


single_entry_dialog_box - Constructor



Package display
Module guiutils
Tool single_entry_dialog_box


Create the popup.


Synopsis
single_entry_dialog_box(prompt, callbackFunction)


Arguments

prompt   Text to display, as a label, to the left of the text entry widget
    Allowed: any string
    Default: ''
callbackFunction   Called at normal termination
    Allowed: Any one-argument Glish function.
    Default: F


Returns
A single_entry_dialog_box


Description
There are occasions in any GUI program where you need the user to enter a small amount of text. Sometimes the best way to get that text is with a popup window containing a text entry widget, and some appropriate termination buttons. A good way to make this operation modeless (i.e., run asynchronously) is to provide a function which will be called when the dialog box terminates; this widget returns the user's text as the first argument to the callback function.


Example
        callback := function (stringValue) { 
           print 'the user is: ', stringValue;
           }
        nameDialog := single_entry_dialog_box ('Your name', callback);





next up previous contents index
Next: single_entry_dialog_box.delete - Function Up: single_entry_dialog_box - Tool Previous: single_entry_dialog_box - Tool   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15