tui::labeltui
Makes a label: one line of text, from -text or a variable of -textvariable.
tui::label PATH ?-option value ...?
Description
Its options: -text, -textvariable (the text of a global variable at each draw), -anchor, -width and -height in cells, -foreground, -background, -style (a list of bold, dim, and reverse), -padx, and -pady. An option that only changes the look in Tk, such as -font or -relief, is accepted and has no effect; -image is an error, since a terminal has no image.
Returns
PATH.
Examples
% tui::label .l -text Hello; tui::pack .l; tui::configure -size {5 1}; tui::snapshot
Hello
% .l cget -text
Hello
Errors
% tui::label .m -image logo
tui: the option -image of label is not in the terminal subset
-errorcode ZTCL TUI SUBSET -image
% tui::label .m -bogus 1
unknown option "-bogus"
-errorcode TK LOOKUP OPTION -bogus
Facts
- Capability
tui. A new interpreter does not have it until the host turns it on.- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.7
The full page: tui::label.