| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
<HTML> |
| 5 |
<HEAD> |
| 6 |
<TITLE>tile(n) manual page</TITLE> |
| 7 |
</HEAD> |
| 8 |
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red"> |
| 9 |
<A HREF="#toc">Table of Contents</A><P> |
| 10 |
|
| 11 |
<H2><A NAME="sect0" HREF="#toc0">Name</A></H2> |
| 12 |
tile - Tiling versions of Tk widgets |
| 13 |
<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2> |
| 14 |
<P> |
| 15 |
<B>tile::button |
| 16 |
<I>pathName</I></B> <I>option value</I>... <P> |
| 17 |
<B>tile::checkbutton <I>pathName</I></B> <I>option value</I>... <P> |
| 18 |
<B>tile::frame |
| 19 |
<I>pathName</I></B> <I>option value</I>... <P> |
| 20 |
<B>tile::label <I>pathName</I></B> <I>option value</I>... <P> |
| 21 |
<B>tile::radiobutton |
| 22 |
<I>pathName</I></B> <I>option value</I>... <P> |
| 23 |
<B>tile::scrollbar <I>pathName</I></B> <I>option value</I>... <P> |
| 24 |
<B>tile::toplevel |
| 25 |
<I>pathName</I></B> <I>option value</I>... <P> |
| 26 |
|
| 27 |
<H2><A NAME="sect2" HREF="#toc2">Description</A></H2> |
| 28 |
The tile widgets let you create textured |
| 29 |
backgrounds. The texture is a Tk image which is tiled over the entire background |
| 30 |
of the widget. |
| 31 |
<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2> |
| 32 |
With the advent of Tk 4.0, images are now easy |
| 33 |
to create and use in applications. Images add interest to applications |
| 34 |
and they convey more information. But one area where Tk hasn't taken advantage |
| 35 |
of images is using images as textures for widgets. Since tiling is a standard |
| 36 |
feature of windowing systems, it's very easy to use images as textures. |
| 37 |
<P> |
| 38 |
The tile widgets take the standard Tk 4.0 widgets and add tiling configuration |
| 39 |
options to them. Textures are specified by the name of the image you wish |
| 40 |
to be tiled across the background of the widget. |
| 41 |
<H2><A NAME="sect4" HREF="#toc4">Example</A></H2> |
| 42 |
To add tiling |
| 43 |
to a widget, you simply create an image using Tk's <B>image</B> command and use |
| 44 |
the image name as the value for the <B>-tile</B> configuration option of the widget. |
| 45 |
<BR> |
| 46 |
<CODE>image create photo my_texture -file tan_paper.gif<BR> |
| 47 |
blt::tile::frame .f -tile my_texture<BR> |
| 48 |
</CODE><P>The image <I>my_texture</I> is added to the frame. If <I>my_texture</I> is updated, |
| 49 |
so will the widget background. <BR> |
| 50 |
<CODE>image create photo my_texture -file rain.gif<BR> |
| 51 |
</CODE><P>The tile widget commands reside in the "blt::tile" namespace, so as not |
| 52 |
to collide with the normal Tk widgets. An easy way to add tiling to existing |
| 53 |
programs is to import the tile widget commands into the global namespace. |
| 54 |
<BR> |
| 55 |
<CODE>image create photo my_texture -file tan_paper.gif<BR> |
| 56 |
namespace import -force blt::tile::*<BR> |
| 57 |
frame .f -tile my_texture<BR> |
| 58 |
</CODE><P>To use one image for all texturing, you can use the "Tile" option class |
| 59 |
name to specify the same image for all tile widgets. <BR> |
| 60 |
<CODE>image create photo my_texture -file tan_paper.gif<BR> |
| 61 |
option add *Tile my_texture<BR> |
| 62 |
|
| 63 |
<H2><A NAME="sect5" HREF="#toc5"></CODE><P>Options</A></H2> |
| 64 |
The following configurations options are added to the widgets. If |
| 65 |
a <B>-tile<B> or <B>-activetile</B></B></B> option is specified, it overrides the background color |
| 66 |
of the widget. |
| 67 |
<DL> |
| 68 |
|
| 69 |
<DT><B>-activetile <I>image</I></B> </DT> |
| 70 |
<DD>Specifies a textured background to display |
| 71 |
when the widget is active. This option is available for the <B>tilebutton</B>, |
| 72 |
<B>tilecheckbutton</B>, <B>tileradiobutton</B>, and <B>tilescrollbar</B> widgets. <I>Image</I> is the |
| 73 |
name an image created using Tk's <B>image</B> command. The background of the widget |
| 74 |
is tiled with <I>image</I>. If <I>image</I> is <I>""</I>, then the active background color is |
| 75 |
displayed. The default is <I>""</I>. </DD> |
| 76 |
|
| 77 |
<DT><B>-tile <I>image</I></B> </DT> |
| 78 |
<DD>Specifies a textured background |
| 79 |
to display for the widget. <I>Image</I> is the name an image created using Tk's |
| 80 |
<B>image</B> command. The background of the widget is tiled with <I>image</I>. If <I>image</I> |
| 81 |
is <I>""</I>, then the normal background color is displayed. The default is <I>""</I>. |
| 82 |
</DD> |
| 83 |
</DL> |
| 84 |
|
| 85 |
<H2><A NAME="sect6" HREF="#toc6">Keywords</A></H2> |
| 86 |
tile, texture, button, label, radiobutton, checkbutton, scrollbar, |
| 87 |
frame, toplevel <P> |
| 88 |
|
| 89 |
<HR><P> |
| 90 |
<A NAME="toc"><B>Table of Contents</B></A><P> |
| 91 |
<UL> |
| 92 |
<LI><A NAME="toc0" HREF="#sect0">Name</A></LI> |
| 93 |
<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI> |
| 94 |
<LI><A NAME="toc2" HREF="#sect2">Description</A></LI> |
| 95 |
<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI> |
| 96 |
<LI><A NAME="toc4" HREF="#sect4">Example</A></LI> |
| 97 |
<LI><A NAME="toc5" HREF="#sect5">Options</A></LI> |
| 98 |
<LI><A NAME="toc6" HREF="#sect6">Keywords</A></LI> |
| 99 |
</UL> |
| 100 |
</BODY></HTML> |