1ttk::scale(n) Tk Themed Widget ttk::scale(n)
2
3
4
5______________________________________________________________________________
6
8 ttk::scale - Create and manipulate a scale widget
9
11 ttk::scale pathName ?options...?
12_________________________________________________________________
13
15 A ttk::scale widget is typically used to control the numeric value of a
16 linked variable that varies uniformly over some range. A scale displays
17 a slider that can be moved along over a trough, with the relative posi‐
18 tion of the slider over the trough indicating the value of the vari‐
19 able.
20
22 -class -cursor -style
23 -takefocus
24
25 See the ttk_widget manual entry for details on the standard options.
26
28 [-command command] Specifies the prefix of a Tcl command to invoke
29 whenever the scale's value is changed via a widget command. The actual
30 command consists of this option followed by a space and a real number
31 indicating the new value of the scale. [-from from] A real value cor‐
32 responding to the left or top end of the scale. [-length length] Spec‐
33 ifies the desired long dimension of the scale in screen units (i.e. any
34 of the forms acceptable to Tk_GetPixels). For vertical scales this is
35 the scale's height; for horizontal scales it is the scale's width.
36 [-orient orient] Specifies which orientation whether the widget should
37 be laid out horizontally or vertically. Must be either horizontal or
38 vertical or an abbreviation of one of these. [-to to] Specifies a real
39 value corresponding to the right or bottom end of the scale. This
40 value may be either less than or greater than the from option.
41 [-value value] Specifies the current floating-point value of the vari‐
42 able. [-variable variable] Specifies the name of a global variable to
43 link to the scale. Whenever the value of the variable changes, the
44 scale will update to reflect this value. Whenever the scale is manipu‐
45 lated interactively, the variable will be modified to reflect the
46 scale's new value.
47
49 pathName cget option
50 Returns the current value of the specified option; see ttk::wid‐
51 get(n).
52
53 pathName configure ?option? ?value option value ...?
54 Modify or query widget options; see ttk::widget(n).
55
56 pathName get ?x y?
57 Get the current value of the -value option, or the value corre‐
58 sponding to the coordinates x,y if they are specified. X and y
59 are pixel coordinates relative to the scale widget origin.
60
61 pathName identify x y
62 Returns the name of the element at position x, y. See ttk::wid‐
63 get(n).
64
65 pathName instate statespec ?script?
66 Test the widget state; see ttk::widget(n).
67
68 pathName set value
69 Set the value of the widget (i.e. the -value option) to value.
70 The value will be clipped to the range given by the -from and
71 -to options. Note that setting the linked variable (i.e. the
72 variable named in the -variable option) does not cause such
73 clipping.
74
75 pathName state ?stateSpec?
76 Modify or query the widget state; see ttk::widget(n).
77
79 pathName coords ?value?
80 Get the coordinates corresponding to value, or the coordinates
81 corresponding to the current value of the -value option if value
82 is omitted.
83
85 ttk::widget(n), scale(n)
86
88 scale, slider, trough, widget
89
90
91
92Tk 8.5 ttk::scale(n)