button configure
Gives or sets the options of the button.
PATHNAME configure
PATHNAME configure OPTION
PATHNAME configure OPTION VALUE ?OPTION VALUE ...?
Description
With no argument, gives a list with an entry for each option. With one OPTION, gives its entry: the option, its database name, its database class, the default, and the value. A short form such as -bd has the entry {-bd -borderwidth}.
With pairs of options and values, sets each option in order and gives an empty string. A bad value stops at that option with an error.
Returns
An entry, a list of entries, or an empty string.
Examples
% button .cf -text Save
> .cf configure -text
-text text Text {} Save
% button .cf2
> .cf2 configure -text Open -width 10
> list [.cf2 cget -text] [.cf2 cget -width]
Open 10
% button .cf3
> llength [.cf3 configure]
35
Errors
% button .cf4; .cf4 configure -text a -width
value for "-width" missing
-errorcode TK VALUE_MISSING
% button .cf5; .cf5 configure -bogus 1
unknown option "-bogus"
-errorcode TK LOOKUP OPTION -bogus
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1