logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

getstring - A string dialog

Bugs, Ideas, Feedback

       This document, and the package it describes, will undoubtedly contain bugs and  other  problems.   Please
       report  such  in  the  category  getstring  of  the TklibTrackers [http://core.tcl.tk/tklib/reportlist].
       Please also report any ideas for enhancements you may have for either package and/or documentation.

Description

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

       ::getstring::tk_getStringpathNamevariabletext ?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 indicating
              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

tklib                                                  0.1                                        getstring(3tk)

Name

       getstring - A string dialog

Synopsis

       package require Tcl8.4

       package require getstring?0.1?::getstring::tk_getStringpathNamevariabletext ?options?

________________________________________________________________________________________________________________

See Also