Paved::label - 1.1

an extension of the label widget

Table Of Contents

NAME

Paved::label - an extension of the label widget

SYNOPSIS

package require Paved::label

Paved::label pathName ?options?

INTRODUCTION

Paved::label is an extension of the label widget.

A Paved-Label is simply a label with a paved (tiled) background.

STANDARD OPTIONS

.. 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.

PAVED-SPECIFIC OPTIONS

-tile image
Specifies an image to display as background, which must have been created with the "image create" command. If image is the empty string, the background is disabled.
-tile filename
filename can be also the name of a supported graphic file ( see [ image types ] )

WIDGET COMMANDS

.. all label widget commands are supported.

EXTENDED COMMANDS

no extended command.

BINDINGS

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.

EXAMPLE

    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

NOTES

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.

HISTORY