ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



getstring(n)                      A dialog which prompts for a string input                     getstring(n)



____________________________________________________________________________________________________________

NAME
       getstring - A string dialog

SYNOPSIS
       package require Tcl  8.4

       package require getstring  ?0.1?

       ::getstring::tk_getString pathName variable text ?options?

____________________________________________________________________________________________________________

DESCRIPTION
       This package provides a dialog which consists of an Entry, OK, and Cancel buttons.


       ::getstring::tk_getString pathName variable text ?options?
              Creates a dialog which prompts the user with text to input a text string.  The contents of the
              entry are put in the variable upon closure of the dialog. The command returns a boolean  indi-cating indicating
              cating if the user pressed OK or not. If -geometry is not specified, the dialog is centered in
              its parent toplevel unless its parent is . in which case the dialog is centered in the screen.
              Options: -title -allowempty a boolean argument indicating if the dialog should accept an empty
              entry -entryoptions simply passes its arguments through to the entry widget. This  is  valuble
              for  performing extra validation using the Entry widget validation hooks.  -geometry specifies
              the geometry of the window

EXAMPLE
       package require getstring
       namespace import getstring::*

       if {[tk_getString .gs text "Feed me a string please:"]} {
           puts "user entered: $text"
       }



KEYWORDS
       dialog, entry, string



getstring                                            0.1                                        getstring(n)

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.