When the view in the widget's window changes, the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1 indicating a position in the document; 0 indicates the beginning, and 1 indicates the end. The first fraction indicates the first information in the widget that is visible in the window, and the second fraction indicates the information just after the last portion that is visible.
Typically the xScrollCommand option consists of the path name of a scrollbar widget followed by “set”, e.g. “.x.scrollbar set”. This will cause the scrollbar to be updated whenever the view in the window changes.
If this option is set to the empty string (the default), then no command is be executed.
if {[pathName instate stateSpec]} script
set changes [pathName state spec] pathName state $changeswill restore pathName to the original state. If stateSpec is not specified, returns a list of the currently-enabled state flags.
A state specification or stateSpec is a list of state names, optionally prefixed with an exclamation point (!) indicating that the bit is off.
set b [ttk::button .b] # Disable the widget: $b state disabled # Invoke the widget only if it is currently pressed and enabled: $b instate {pressed !disabled} { .b invoke } # Reenable widget: $b state !disabled