Paved::label - an extension of the label widget
package require Paved::label
Paved::label pathName ?options?
Paved::label is an extension of the label widget.
A Paved-Label is simply a label with a paved (tiled) background.
.. all label options are supported.
Be careful that -image option has been removed (replaced by -tile) (see below)
The -compound option only accepts the following values: none, center. Other 'valid' values are forced to center.
.. all label widget commands are supported.
no extended command.
A script is attached to the <Configure> event for the pseudo class PavedLabel, so that each time the widget is resized, the background image is resized accordling.
package require Paved::label # suppose xyz.gif is in current directory image create photo xyzImage -file xyz.gif # create a tiled-label widget; use 'xyzImage' as background. # and place a text centered Paved::label .c -tile xyzImage -borderwidth 10 -relief sunken \ -compound center -text "This is a paved-label widget" pack .c -fill both -expand true wm geometry . 200x200
or in a more compact form:
package require Paved::label Paved::label .c -tile xyz.gif -borderwidth 10 -relief sunken \ -compound center -text "This is a paved-label widget" pack .c -fill both -expand true wm geometry . 200x200
Unless your Paved::label is 'expanded' by the geometry manager (e.g. 'packer'), ALWAYS set a (minumum) height/width (options -width, -height), or, its size will 'collapse' to the text size (if any), or to few pixels (if -text is empty).
For each Paved::label widget ".x" , the following items will be created:
These items should never be manipulated. They will be automatically destroyed when widget ".x" is destroyed.