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-Line Name:-command
28 Database Name: command
29 Database Class: Command
30
31 A script to evaluate when the widget is invoked.
32
33 Command-Line Name:-default
34 Database Name: default
35 Database Class: Default
36
37 May be set to one of normal, active, or disabled. In a dialog
38 box, one button may be designated the “default” button (meaning,
39 roughly, “the one that gets invoked when the user presses
40 <Enter>”). active indicates that this is currently the default
41 button; normal means that it may become the default button, and
42 disabled means that it is not defaultable. The default is nor‐
43 mal.
44
45 Depending on the theme, the default button may be displayed with
46 an extra highlight ring, or with a different border color.
47
49 In addition to the standard cget, configure, identify, instate, and
50 state commands, buttons support the following additional widget com‐
51 mands:
52
53 pathName invoke
54 Invokes the command associated with the button.
55
57 Ttk::button widgets support the Toolbutton style in all standard
58 themes, which is useful for creating widgets for toolbars.
59
61 The class name for a ttk::button is TButton.
62
63 Dynamic states: active, disabled, pressed, readonly.
64
65 TButton styling options configurable with ttk::style are:
66
67 -anchor anchor
68 -background color
69 -bordercolor color
70 -compound compound
71 -darkcolor color
72 -foreground color
73 -font font
74 -highlightcolor color
75 -highlightthickness amount
76 -lightcolor color
77 -padding padding
78 -relief relief
79 -shiftrelief amount
80 -shiftrelief specifies how far the button contents are shifted
81 down and right in the pressed state. This action provides addi‐
82 tional skeumorphic feedback.
83 -width amount
84
85 Some options are only available for specific themes.
86
87 See the ttk::style manual page for information on how to configure ttk
88 styles.
89
91 ttk::widget(n), button(n)
92
94 widget, button, default, command
95
96
97
98Tk 8.5 ttk::button(n)