If it returns 0 (or the valid boolean equivalent) then it means you reject the new edition and it will not occur and the invalidCommand will be evaluated if it is set. This command must return a valid boolean value. Setting it to undef disables this feature (the default). Specifies a script to eval when you want to validate the input into the entry widget. Name: validateCommand Class: ValidateCommand Switch: -validatecommand Alias: -vcmd When you want validation, you must explicitly state which mode you wish to use. Specifies the mode in which validation should operate: none, focus, focusin, focusout, key, or all. Name: validate Class: Validate Switch: -validate If the entry is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the entry may be displayed in a different color, depending on the values of the -disabledforeground and -disabledbackground options. If the entry is readonly, then the value may not be changed using widget commands and no insertion cursor will be displayed, even if the input focus is in the widget the contents of the widget may still be selected. Specifies one of three states for the entry: normal, disabled, or readonly. If characters in the entry are selected and copied elsewhere, the information copied will be what is displayed, not the true contents of the entry. This is useful, for example, if the entry is to be used to enter a password.
Instead, each character in the entry's value will be displayed as the first character in the value of this option, such as ``*''. If this option is specified, then the true contents of the entry are not displayed in the window. If this option is the empty string, the normal background color is used. Specifies the background color to use when the entry is read-only.
Command-Line Name: -readonlybackground Database Name: readonlyBackground Database Class: ReadonlyBackground See Validation below for more information. The best use of this option is to set it to bell. Setting it to disables this feature (the default). Specifies a script to eval when validateCommand returns 0. Name: invalidCommand Class: InvalidCommand Switch: -invalidcommand Alias: -invcmd If this option is the empty string, the normal foreground color is used. Specifies the foreground color to use when the entry is disabled. Command-Line Name: -disabledforeground Database Name: disabledForeground Database Class: DisabledForeground Specifies the background color to use when the entry is disabled. background -highlightbackground -insertontime -selectforeground -borderwidth -highlightcolor -insertwidth -takefocus -cursor -highlightthickness -justify -textvariable -exportselection -insertbackground -relief -xscrollcommand -font -insertborderwidth -selectbackground -foreground -insertofftime -selectborderwidth WIDGET-SPECIFIC OPTIONS Command-Line Name: -disabledbackground Database Name: disabledBackground Database Class: DisabledBackground $entry = $parent-> Entry(? options?) STANDARD OPTIONS Tk::Entry - Create and manipulate Entry widgets SYNOPSIS