ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH

Reference
ActiveTcl 8.5
ActiveTcl 8.5.4.0 User Guide
ActiveTcl 8.5.4.0 Documentation Index
Tklib
autoscroll
canvasLabel
chatwidget
ctext
cursor
datefield
Diagrams
getstring
history
ico
ipentry
khim
ntext
ntextBindings
ntextIndent
ntextWordBreak
pie
pieBoxLabeler
piePeripheralLabeler
Plotchart
swaplist
tooltip
widget
widget toolbar

MyASPN >> Reference >> ActiveTcl 8.5 >> ActiveTcl 8.5.4.0 User Guide >> ActiveTcl 8.5.4.0 Documentation Index >> Tklib
ActiveTcl 8.5 documentation

[ Main table Of Contents | Tklib Table Of Contents | Tklib Index ]

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

Name

getstring - A string dialog

Synopsis

  • package require Tcl 8.4
  • package require getstring ?0.1?

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 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"
}

Copyright © 2008 for compilation: ActiveState


Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved