NAME
option - Add/retrieve window options to/from the option database
SYNOPSIS
ooppttiioonn aadddd pattern value ?priority? ooppttiioonn cclleeaarr ooppttiioonn ggeett window name class ooppttiioonn rreeaaddffiillee fileName ?priority?DESCRIPTION
The ooppttiioonn command allows you to add entries to the Tk option database
or to retrieve options from the database. The aadddd form of the command
adds a new option to the database. Pattern contains the option being
specified, and consists of names and/or classes separated by asterisksor dots, in the usual X format. Value contains a text string to asso-
ciate with pattern; this is the value that will be returned in callso TkGetOption r y noain o te option get omn. f ro-
ity is specified, it indicates the priority level for this option (see
below for legal values); it defaults to iinntteerraaccttiivvee. This command always returns an empty string.The ooppttiioonn cclleeaarr command clears the option database. Default options
(from the RREESSOOUURRCCEEMMAANNAAGGEERR property or the ..XXddeeffaauullttss file) will bereloaded automatically the next time an option is added to the database
or removed from it. This command always returns an empty string.The ooppttiioonn ggeett command returns the value of the option specified for
window under name and class. If several entries in the option database
match window, name, and class, then the command returns whichever was created with highest priority level. If there are several matching entries at the same priority level, then it returns whichever entry wasmost recently entered into the option database. If there are no match-
ing entries, then the empty string is returned. The rreeaaddffiillee form of the command reads fileName, which should have the standard format for an X resource database such as ..XXddeeffaauullttss, and addsall the options specified in that file to the option database. If pri-
ority is specified, it indicates the priority level at which to enterthe options; priority defaults to iinntteerraaccttiivvee.
The priority arguments to the ooppttiioonn command are normally specified symbolically using one of the following values: wwiiddggeettDDeeffaauullttLevel 20. Used for default values hard-coded into widgets.
ssttaarrttuuppFFiilleeLevel 40. Used for options specified in application-specific
startup files. uusseerrDDeeffaauullttLevel 60. Used for options specified in user-specific defaults
files, such as ..XXddeeffaauullttss, resource databases loaded into the Xserver, or user-specific startup files.
iinntteerraaccttiivveeLevel 80. Used for options specified interactively after the
application starts running. If priority isn't specified, it defaults to this level. Any of the above keywords may be abbreviated. In addition, prioritiesmay be specified numerically using integers between 0 and 100, inclu-
sive. The numeric form is probably a bad idea except for new priority levels other than the ones given above. KKEEYYWWOORRDDSSdatabase, option, priority, retrieve
Tk option(n)