1getstring(n)       A dialog which prompts for a string input      getstring(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       getstring - A string dialog
9

SYNOPSIS

11       package require Tcl  8.4
12
13       package require getstring  ?0.1?
14
15       ::getstring::tk_getString pathName variable text ?options?
16
17_________________________________________________________________
18

DESCRIPTION

20       This package provides a dialog which consists of an Entry, OK, and Can‐
21       cel buttons.
22
23       ::getstring::tk_getString pathName variable text ?options?
24              Creates a dialog which prompts the user with  text  to  input  a
25              text  string.  The contents of the entry are put in the variable
26              upon closure of the dialog. The command returns a boolean  indi‐
27              cating if the user pressed OK or not. If -geometry is not speci‐
28              fied, the dialog is centered in its parent toplevel  unless  its
29              parent  is . in which case the dialog is centered in the screen.
30              Options: -title -allowempty a boolean argument indicating if the
31              dialog  should accept an empty entry -entryoptions simply passes
32              its arguments through to the entry widget. This is  valuble  for
33              performing  extra  validation  using the Entry widget validation
34              hooks.  -geometry specifies the geometry of the window
35

EXAMPLE

37       package require getstring
38       namespace import getstring::*
39
40       if {[tk_getString .gs text "Feed me a string please:"]} {
41           puts "user entered: $text"
42       }
43
44
45

KEYWORDS

47       dialog, entry, string
48
49
50
51getstring                             0.1                         getstring(n)
Impressum