1ttk::button(n) Tk Themed Widget ttk::button(n)
2
3
4
5______________________________________________________________________________
6
8 ttk::button - Widget that issues a command when pressed
9
11 ttk::button pathName ?options?
12_________________________________________________________________
13
15 A ttk::button widget displays a textual label and/or image, and evalu‐
16 ates a command when pressed.
17
19 -class -compound -cursor
20 -image -state -style
21 -takefocus -text -textvariable
22 -underline -width
23
24 See the ttk_widget manual entry for details on the standard options.
25
27 [-command command] A script to evaluate when the widget is invoked.
28 [-default default] May be set to one of normal, active, or disabled.
29 In a dialog box, one button may be designated the “default” button
30 (meaning, roughly, “the one that gets invoked when the user presses
31 <Enter>”). active indicates that this is currently the default button;
32 normal means that it may become the default button, and disabled means
33 that it is not defaultable. The default is normal.
34
35 Depending on the theme, the default button may be displayed with
36 an extra highlight ring, or with a different border color.
37 [-width width] If greater than zero, specifies how much space, in char‐
38 acter widths, to allocate for the text label. If less than zero, spec‐
39 ifies a minimum width. If zero or unspecified, the natural width of
40 the text label is used. Note that some themes may specify a non-zero
41 -width in the style.
42
44 In addition to the standard cget, configure, identify, instate, and
45 state commands, checkbuttons support the following additional widget
46 commands:
47
48 pathName invoke
49 Invokes the command associated with the button.
50
52 [-state state] May be set to normal or disabled to control the disabled
53 state bit. This is a “write-only” option: setting it changes the widget
54 state, but the state widget command does not affect the state option.
55
57 ttk::widget(n), button(n)
58
60 widget, button, default, command
61
62
63
64Tk 8.5 ttk::button(n)