Labelled items
Often, you want to just attach a text label to an item.
The Slate has a couple of item types that are essentially just
simple canvas items with text labels inside them.
LabelledOval is an oval with a text label inside it. It has
the following options:
- -fill. The color with which the oval is filled. By default,
it is "", which means that the oval is not filled.
- -outline. The color of the outline of the oval. If "",
the oval has no outline. By default, it is black.
- -text. The label placed in the center of the oval.
By default, it is "", which means that nothing is displayed.
- -width. The width of the outline of the oval, in pixels. By
default, it is one.
In all other respects, it can be treated like any other oval item.
Enhancements: (none)
Example: Create a labelled oval:
source $tycho/editors/slate/doc/internals/newslate.itcl
$slate create LabelledOval 40 40 100 80 -fill white -outline blue \
-width 4 -text Foo -tags moveable
LabelledRect
LabelledRect is a rectangle with a text label inside it. It has
not been implemented yet. (Only because no-one has needed it yet -- it
will be simple enough: just follow the pattern of LabelledOval.)
Back up
Tycho Home Page
Copyright © 1996, The Regents of the University of California.
All rights reserved.
Last updated: 96/12/11,
comments to: johnr@eecs.berkeley.edu