canvasLabel - tkpiechart canvas label class
Contents
Bugs, Ideas, Feedback
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please
report such in the category tkpiechart of the TklibTrackers [http://core.tcl.tk/tklib/reportlist].
Please also report any ideas for enhancements you may have for either package and/or documentation.
Copyright
Copyright (c) 1995-2004 Jean-Luc Fontaine <jfontain@free.fr>
tklib 6.6 canvasLabel(3tk)
Description
The canvasLabel class brings some Tk label widget functionality to the canvas text item, such as a
background and a border.
The canvasLabel is built with a bullet rectangle on the left side of the text. The relief changes
according to the select state, with a traditionally sunken relief when selected.
The label has a specific tag, which can be used to retrieve the coordinates of the object or move it,
thanks to the canvas facilities.
stooop::newcanvasLabelcanvas ?options?
Creates a canvasLabel object in the specified Tk canvas. The canvasLabel object identifier is
returned (referred to as canvasLabelObject in this document).
switched::configurecanvasLabelObject ?options?
Configures a canvasLabel object or returns all the options with their current values if no options
are passed as parameters.
switched::cgetcanvasLabelObjectoption
Returns an option value for the specified canvasLabel object.
stooop::deletecanvasLabelObject
Deletes the specified canvasLabel object.
Keywords
canvas, labeler, pie, slice
Name
canvasLabel - tkpiechart canvas label class
Options
-anchor value
Specifies the anchor position of the rectangle and the text, relative to the positioning point.
The behavior is similar to the -anchor option of the canvastext item, except that the rectangle
is taken into account. The default is center.
-background color
Specifies the background color of the bullet rectangle, as in the -fill option of the canvasrectangle item. The default is transparent (empty string).
-bordercolor color
Specifies the border color of the rectangle, as in the -outline option of the canvasrectangle
item. The default is black.
-borderwidth value
Specifies the border width of the rectangle, as in the -width option of the canvasrectangle item.
By default, the width is 1 pixel, which is the minimum width.
-bulletwidth value
Specifies the width of the rectangle placed to the left of the text. Defaults to 10.
-font value
Specifies the font of the text, as in the -font option of the canvastext item. The default is
system dependent.
-foreground color
Specifies the color of the text, as in the -fill option of the canvastext item. The default is
black.
-justify value
Specifies how to justify the text, as in the -justify option of the canvastext item. The default
is left.
-minimumwidth value
The total label width will not go below the specified value, but may be larger if the label text
requires it.
-padding value
Specifies how much space to leave between the text and the closest rectangle edge. Units are
identical to those specified in the canvasCOORDINATES manual section.
-scale list
List of 2 floating point numbers used to set the scaling factor in the x and y axis. Scaling is
applied immediately and defaults to 1.
-select boolean
Sets the label state.
-selectrelief value
Either flat, raised or sunken. Specifies the 3D effect desired for the text area when the label is
selected.
-stipple bitmap
Specifies the stipple pattern filling the rectangle, as in the -stipple option of the canvasrectangle item. There is no bitmap by default.
-text text
Specifies the string to be displayed in the text area, as in the -text option of the canvastext
item. The default is an empty string.
-textbackground color
Specifies the color of the text area background.
-width value
Specifies a maximum line length for the text, as in the -width option of the canvastext item. The
default is 0.
See Also
pie, pieBoxLabeler, piePeripheralLabeler
Synopsis
package require stooop4.1
package require switched2.2
package require tkpiechart6.6stooop::newcanvasLabelcanvas ?options?
switched::configurecanvasLabelObject ?options?
switched::cgetcanvasLabelObjectoptionstooop::deletecanvasLabelObject
________________________________________________________________________________________________________________
