1canvasLabel(n) canvasLabel class canvasLabel(n)
2
3
4
5______________________________________________________________________________
6
8 canvasLabel - tkpiechart canvas label class
9
11 package require stooop 4.1
12
13 package require switched 2.2
14
15 package require tkpiechart 6.6
16
17 stooop::new canvasLabel canvas ?options?
18
19 switched::configure canvasLabelObject ?options?
20
21 switched::cget canvasLabelObject option
22
23 stooop::delete canvasLabelObject
24
25______________________________________________________________________________
26
28 The canvasLabel class brings some Tk label widget functionality to the
29 canvas text item, such as a background and a border.
30
31 The canvasLabel is built with a bullet rectangle on the left side of
32 the text. The relief changes according to the select state, with a tra‐
33 ditionally sunken relief when selected.
34
35 The label has a specific tag, which can be used to retrieve the coordi‐
36 nates of the object or move it, thanks to the canvas facilities.
37
38 stooop::new canvasLabel canvas ?options?
39 Creates a canvasLabel object in the specified Tk canvas. The
40 canvasLabel object identifier is returned (referred to as can‐
41 vasLabelObject in this document).
42
43 switched::configure canvasLabelObject ?options?
44 Configures a canvasLabel object or returns all the options with
45 their current values if no options are passed as parameters.
46
47 switched::cget canvasLabelObject option
48 Returns an option value for the specified canvasLabel object.
49
50 stooop::delete canvasLabelObject
51 Deletes the specified canvasLabel object.
52
54 -anchor value
55 Specifies the anchor position of the rectangle and the text,
56 relative to the positioning point. The behavior is similar to
57 the -anchor option of the canvas text item, except that the rec‐
58 tangle is taken into account. The default is center.
59
60 -background color
61 Specifies the background color of the bullet rectangle, as in
62 the -fill option of the canvas rectangle item. The default is
63 transparent (empty string).
64
65 -bordercolor color
66 Specifies the border color of the rectangle, as in the -outline
67 option of the canvas rectangle item. The default is black.
68
69 -borderwidth value
70 Specifies the border width of the rectangle, as in the -width
71 option of the canvas rectangle item. By default, the width is 1
72 pixel, which is the minimum width.
73
74 -bulletwidth value
75 Specifies the width of the rectangle placed to the left of the
76 text. Defaults to 10.
77
78 -font value
79 Specifies the font of the text, as in the -font option of the
80 canvas text item. The default is system dependent.
81
82 -foreground color
83 Specifies the color of the text, as in the -fill option of the
84 canvas text item. The default is black.
85
86 -justify value
87 Specifies how to justify the text, as in the -justify option of
88 the canvas text item. The default is left.
89
90 -minimumwidth value
91 The total label width will not go below the specified value, but
92 may be larger if the label text requires it.
93
94 -padding value
95 Specifies how much space to leave between the text and the clos‐
96 est rectangle edge. Units are identical to those specified in
97 the canvas COORDINATES manual section.
98
99 -scale list
100 List of 2 floating point numbers used to set the scaling factor
101 in the x and y axis. Scaling is applied immediately and defaults
102 to 1.
103
104 -select boolean
105 Sets the label state.
106
107 -selectrelief value
108 Either flat, raised or sunken. Specifies the 3D effect desired
109 for the text area when the label is selected.
110
111 -stipple bitmap
112 Specifies the stipple pattern filling the rectangle, as in the
113 -stipple option of the canvas rectangle item. There is no bitmap
114 by default.
115
116 -text text
117 Specifies the string to be displayed in the text area, as in the
118 -text option of the canvas text item. The default is an empty
119 string.
120
121 -textbackground color
122 Specifies the color of the text area background.
123
124 -width value
125 Specifies a maximum line length for the text, as in the -width
126 option of the canvas text item. The default is 0.
127
129 The labeler has the following specific tag (see the canvas manual page
130 ITEM IDS AND TAGS section for more information):
131
132 • canvasLabel(canvasLabelObject)
133
135 pie, pieBoxLabeler, piePeripheralLabeler
136
138 canvas, labeler, pie, slice
139
141 Copyright (c) 1995-2004 Jean-Luc Fontaine <jfontain@free.fr>
142
143
144
145
146tkpiechart 6.6 canvasLabel(n)