Paved::Tree - 1.1
an extension of the BWidget-Tree widget
NAME
Paved::Tree - an extension of the BWidget-Tree widget
Table Of Contents
SYNOPSIS
package require Paved::Tree
Paved::Tree pathName ?options?
INTRODUCTION
Paved::Tree is an extension of the BWidget-Tree widget.
A Paved-Tree is simply a Tree with a paved (tiled) background.
STANDARD OPTIONS
.. all Tree options are supported.
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 ] )
- -bgzoom n
-
n is an integer value (default 1). With this option, each pixel of the source image will be expanded into a block of n x n pixels.
- -tileorigin tuple
-
tuple is a list with two coordinates describing where the top-left corner of the 'first' tile will be placed in the canvas.
Default is { 0 0 }.
Each of the coordinates may be specified in any of the valid forms for the 'canvas' COORDINATES.
If you have a MxN tile and you want its center be on the point (0,0) of the canvas, specify -tileorigin { M/2 N/2 } (or, equivalently {-M/2 -N/2}, by virtue of coherence properties)
WIDGET COMMANDS
.. all Tree widget commands are supported.
EXTENDED COMMANDS
no extended command.
BINDINGS
... see Tree bindings
EXAMPLE
package require Paved::Tree
# suppose xyz.gif is in current directory
image create photo xyzImage -file xyz.gif
# create a tiled-Tree widget; use 'xyzImage' as background.
Paved::Tree .t -tile xyzImage -borderwidth 10 -relief sunken
pack .t -fill both -expand true
.t insert end root #auto -text aaa
.t insert end root #auto -text bbb
.t insert end root #auto -text ccc
or in a more compact form:
package require Paved::Tree
Paved::Tree .t -tile xyz.gif -borderwidth 10 -relief sunken
pack .t -fill both -expand true
.t insert end root #auto -text aaa
.t insert end root #auto -text bbb
.t insert end root #auto -text ccc
NOTES
Paved::Tree is dramatically slow when the wisdget is resized !
HISTORY