home *** CD-ROM | disk | FTP | other *** search
-
- <HTML>
- <HEAD>
- <TITLE>Tk::DItem - Tix Display Items</TITLE>
- <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
- <LINK REV="made" HREF="mailto:">
- </HEAD>
-
- <BODY>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Tk::DItem - Tix Display Items</P></STRONG>
- </TD></TR>
- </TABLE>
-
- <A NAME="__index__"></A>
- <!-- INDEX BEGIN -->
-
- <UL>
-
- <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
-
- <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
- <LI><A HREF="#description">DESCRIPTION</A></LI>
- <LI><A HREF="#display item types and options">DISPLAY ITEM TYPES AND OPTIONS</A></LI>
- <LI><A HREF="#imagetext items">IMAGETEXT ITEMS</A></LI>
- <UL>
-
- <LI><A HREF="#imagetext item options">Imagetext Item Options</A></LI>
- <LI><A HREF="#imagetext style options">Imagetext Style Options</A></LI>
- </UL>
-
- <LI><A HREF="#text items">TEXT ITEMS</A></LI>
- <UL>
-
- <LI><A HREF="#text item options">Text Item Options</A></LI>
- <LI><A HREF="#text style options">Text Style Options</A></LI>
- </UL>
-
- <LI><A HREF="#window items">WINDOW ITEMS</A></LI>
- <UL>
-
- <LI><A HREF="#window item options">Window Item Options</A></LI>
- <LI><A HREF="#window style options">Window Style Options</A></LI>
- </UL>
-
- <LI><A HREF="#creating display items">CREATING DISPLAY ITEMS</A></LI>
- <LI><A HREF="#creating and manipulating item styles">CREATING AND MANIPULATING ITEM STYLES</A></LI>
- <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
- <LI><A HREF="#style methods">STYLE METHODS</A></LI>
- <LI><A HREF="#example">EXAMPLE</A></LI>
- <LI><A HREF="#see also">SEE ALSO</A></LI>
- <LI><A HREF="#keywords">KEYWORDS</A></LI>
- </UL>
- <!-- INDEX END -->
-
- <HR>
- <P>
- <H1><A NAME="name">NAME</A></H1>
- <P>Tk::DItem - Tix Display Items</P>
- <P>
- <HR>
- <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
- <UL>
- <LI>Linux</LI>
- <LI>Solaris</LI>
- <LI>Windows</LI>
- </UL>
- <HR>
- <H1><A NAME="synopsis">SYNOPSIS</A></H1>
- <P>
- <HR>
- <H1><A NAME="description">DESCRIPTION</A></H1>
- <P>The Tix <STRONG>Display Items</STRONG> and <STRONG>Display Types</STRONG> are devised to
- solve a general problem: many Tix widgets (both existing and planned
- ones) display many items of many types simultaneously.</P>
- <P>For example, a hierarchical listbox widget (see <A HREF="../../../site/lib/Tk/HList.html">the Tk::HList manpage</A>) can display
- items
- of images, plain text and subwindows in the form of a
- hierarchy. Another widget, the tabular listbox widget (see <A HREF="../../../site/lib/Tk/TList.html">the Tk::TList manpage</A>)
- also displays items of the
- same types, although it arranges the items in a tabular form. Yet
- another widget, the spreadsheet widget (see <A HREF="../../../site/lib/Tk/TixGrid.html">the Tk::TixGrid manpage</A>),
- also displays similar types
- items, but in yet another format.</P>
- <P>In these examples, the display items in different widgets are only
- different in how they are arranged by the <STRONG>host widget</STRONG>. In Tix,
- display items are clearly separated from the host widgets. The
- advantage is two-fold: first, the creation and configuration of
- display items become uniform across different host widgets. Second,
- new display item types can be added without the need to modify the
- existing host widgets.</P>
- <P>In a way, Tix display items are similar to the items inside Tk
- the canvas widget. However, unlike the Tix display items, the canvas
- items are not independent of the canvas widget; this makes it
- impossible to use the canvas items inside other types of TK widgets.</P>
- <P>The appearance of a display item is controlled by a set of
- <EM>attributes</EM>. It is observed that each the attributes usually fall
- into one of two categroies: ``<EM>individual</EM>'' or
- ``<EM>collective</EM>''. For example, the text items inside a HList widget
- may all display a different text string; however, in most cases, the
- text items share the same color, font and spacing. Instead of keeping
- a duplicated version of the same attributes inside each display item,
- it will be advantageous to put the collective attributes in a
- special object called a <STRONG>display style</STRONG>. First, there is the space
- concern: a host widget may have many thousands of items; keeping
- dupilcated attributes will be very wasteful. Second, when it becomes
- necessary to change a collective attribute, such as changing all the
- text items' foreground color to red, it will be more efficient to
- change only the display style object than to modify all the text
- items one by one.</P>
- <P>The attributes of the a display item are thus stored in two places: it
- has a set of <STRONG>item options</STRONG> to store its individual attributes. Each
- display item is also associated with a <EM>display style</EM>, which specifies
- the collective attributes of all items associated with itself.</P>
- <P>The division between the individual and collective attributes are
- fixed and cannot be changed. Thus, when it becomes necessary for some
- items to differ in their collective attributes, two or more <STRONG>display styles</STRONG>
- can be used. For example, suppose you want to display two
- columns of text items inside an HList widget, one column in red and
- the other in blue. You can create a TextStyle object called ``$red''
- which defines a red foreground, and another called ``$blue'', which
- defines a blue foreground. You can then associate all text items of
- the first column to ``$red'' and the second column to ``$blue''</P>
- <P>
- <HR>
- <H1><A NAME="display item types and options">DISPLAY ITEM TYPES AND OPTIONS</A></H1>
- <P>Currently there are three types of display items: <STRONG>text</STRONG>,
- <STRONG>imagetext</STRONG> and <EM>window</EM>.</P>
- <P>
- <HR>
- <H1><A NAME="imagetext items">IMAGETEXT ITEMS</A></H1>
- <P>Display items of the type <STRONG>imagetext</STRONG> are used to display an image
- together with a text string. Imagetext items support the following options:</P>
- <P>
- <H2><A NAME="imagetext item options">Imagetext Item Options</A></H2>
- <DL>
- <DT><STRONG><A NAME="item_Name%3A_bitmap">Name: <STRONG>bitmap</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Bitmap">Class: <STRONG>Bitmap</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dbitmap">Switch: <STRONG>-bitmap</STRONG></A></STRONG><BR>
- <DD>
- Specifies the bitmap to display in the item.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_image">Name: <STRONG>image</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Image">Class: <STRONG>Image</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dimage">Switch: <STRONG>-image</STRONG></A></STRONG><BR>
- <DD>
- Specifies the image to display in the item. When both the
- <STRONG>-bitmap</STRONG> and <STRONG>-image</STRONG> options are specified, only the image
- will be displayed.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_imageTextStyle">Name: <STRONG>imageTextStyle</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_ImageTextStyle">Class: <STRONG>ImageTextStyle</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dstyle">Switch: <STRONG>-style</STRONG></A></STRONG><BR>
- <DD>
- Specifies the display style to use for this item. Must be the
- name of a <STRONG>imagetext</STRONG> display style that has already be created with
- <STRONG>ItemStyle</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_showImage">Name: <STRONG>showImage</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_ShowImage">Class: <STRONG>ShowImage</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dshowimage">Switch: <STRONG>-showimage</STRONG></A></STRONG><BR>
- <DD>
- A Boolean value that specifies whether the image/bitmap should be
- displayed.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_showText">Name: <STRONG>showText</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_ShowText">Class: <STRONG>ShowText</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dshowtext">Switch: <STRONG>-showtext</STRONG></A></STRONG><BR>
- <DD>
- A Boolean value that specifies whether the text string should be
- displayed.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_text">Name: <STRONG>text</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Text">Class: <STRONG>Text</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dtext">Switch: <STRONG>-text</STRONG></A></STRONG><BR>
- <DD>
- Specifies the text string to display in the item.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_underline">Name: <STRONG>underline</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Underline">Class: <STRONG>Underline</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dunderline">Switch: <STRONG>-underline</STRONG></A></STRONG><BR>
- <DD>
- Specifies the integer index of a character to underline in the text
- string in the item. 0 corresponds to the first character of the text
- displayed in the widget, 1 to the next character, and so on.
- <P></P></DL>
- <P>
- <H2><A NAME="imagetext style options">Imagetext Style Options</A></H2>
- <P>The style information of <STRONG>imagetext</STRONG> items are stored in the
- <STRONG>imagetext</STRONG> display style. The following options are supported:</P>
- <P><STRONG>STANDARD OPTIONS</STRONG></P>
- <P><TABLE CELLSPACING=0 CELLPADDING=0><TR><TD><STRONG>-activebackground</STRONG><TD><STRONG>-activeforeground</STRONG>
- <TR><TD><STRONG>-anchor</STRONG><TD><STRONG>-background</STRONG>
- <TR><TD><STRONG>-disabledbackground</STRONG><TD><STRONG>-disabledforeground</STRONG>
- <TR><TD><STRONG>-foreground</STRONG><TD><STRONG>-font</STRONG>
- <TR><TD><STRONG>-justify</STRONG><TD><STRONG>-padx</STRONG>
- <TR><TD><STRONG>-pady</STRONG><TD><STRONG>-selectbackground</STRONG>
- <TR><TD><STRONG>-selectforeground</STRONG><TD><STRONG>-wraplength</STRONG></TABLE></P>
- <P>See <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> for details of the standard options.</P>
- <P><STRONG>STYLE-SPECIFIC OPTIONS</STRONG></P>
- <DL>
- <DT><STRONG><A NAME="item_Name%3A_gap">Name: <STRONG>gap</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Gap">Class: <STRONG>Gap</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dgap">Switch: <STRONG>-gap</STRONG></A></STRONG><BR>
- <DD>
- Specifies the distance between the bitmap/image and the text string,
- in number of pixels.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_textAnchor">Name: <STRONG>textAnchor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_TextAnchor">Class: <STRONG>TextAnchor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dtextanchor">Switch: <STRONG>-textanchor</STRONG></A></STRONG><BR>
- <DD>
- The anchor position on the image to which text part is attached.
- This is a perl/Tk addition. Defaults to <STRONG>e</STRONG> for compatibility with standard
- Tix. The interesting cases are
- <DL>
- <DT><STRONG><A NAME="item_n"><STRONG>n</STRONG></A></STRONG><BR>
- <DD>
- Text is centred above the image.
- <P></P>
- <DT><STRONG><A NAME="item_s"><STRONG>s</STRONG></A></STRONG><BR>
- <DD>
- Text is centred below the image
- <P></P>
- <DT><STRONG><A NAME="item_e"><STRONG>e</STRONG></A></STRONG><BR>
- <DD>
- Text is centred to right of the image.
- <P></P>
- <DT><STRONG><A NAME="item_w"><STRONG>w</STRONG></A></STRONG><BR>
- <DD>
- Text is centred to left of the image.
- <P></P>
- <DT><STRONG><A NAME="item_c"><STRONG>c</STRONG></A></STRONG><BR>
- <DD>
- Text is centred over the image.
- <P></P></DL>
- <P>The <STRONG>sw</STRONG>, <STRONG>se</STRONG>, <STRONG>ne</STRONG>, and b<nw> cases look rather odd.</P>
- <P>To get items to line up correctly it will usually be necessary
- to specify <STRONG>-anchor</STRONG> as well. e.g. with default <STRONG>e</STRONG> then anchoring
- item as a whole <STRONG>w</STRONG> lines images up down left with text stuck to right side.</P>
- </DL>
- <P>
- <HR>
- <H1><A NAME="text items">TEXT ITEMS</A></H1>
- <P>Display items of the type <STRONG>text</STRONG> are used to display a text string
- in a widget. Text items support the following options:</P>
- <P>
- <H2><A NAME="text item options">Text Item Options</A></H2>
- <DL>
- <DT><STRONG><A NAME="item_Name%3A_textStyle">Name: <STRONG>textStyle</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_TextStyle">Class: <STRONG>TextStyle</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Switch: <STRONG>-style</STRONG></STRONG><BR>
- <DD>
- Specifies the display style to use for this text item. Must be the
- name of a <STRONG>text</STRONG> display style that has already be created with
- <STRONG>ItemStyle</STRONG>.
- <P></P>
- <DT><STRONG>Name: <STRONG>text</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Text</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG>Switch: <STRONG>-text</STRONG></STRONG><BR>
- <DD>
- Specifies the text string to display in the item.
- <P></P>
- <DT><STRONG>Name: <STRONG>underline</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Underline</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG>Switch: <STRONG>-underline</STRONG></STRONG><BR>
- <DD>
- Specifies the integer index of a character to underline in the item.
- 0 corresponds to the first character of the text displayed in the
- widget, 1 to the next character, and so on.
- <P></P></DL>
- <P>
- <H2><A NAME="text style options">Text Style Options</A></H2>
- <P><STRONG>STANDARD OPTIONS</STRONG></P>
- <P><TABLE CELLSPACING=0 CELLPADDING=0><TR><TD><STRONG>-activebackground</STRONG><TD><STRONG>-activeforeground</STRONG>
- <TR><TD><STRONG>-anchor</STRONG><TD><STRONG>-background</STRONG>
- <TR><TD><STRONG>-disabledbackground</STRONG><TD><STRONG>-disabledforeground</STRONG>
- <TR><TD><STRONG>-foreground</STRONG><TD><STRONG>-font</STRONG>
- <TR><TD><STRONG>-justify</STRONG><TD><STRONG>-padx</STRONG>
- <TR><TD><STRONG>-pady</STRONG><TD><STRONG>-selectbackground</STRONG>
- <TR><TD><STRONG>-selectforeground</STRONG><TD><STRONG>-wraplength</STRONG></TABLE></P>
- <P>See <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> for details of the standard options.</P>
- <P>
- <HR>
- <H1><A NAME="window items">WINDOW ITEMS</A></H1>
- <P>Display items of the type <EM>window</EM> are used to display a
- sub-window in a widget. <STRONG>Window</STRONG> items support the following
- options:</P>
- <P>
- <H2><A NAME="window item options">Window Item Options</A></H2>
- <DL>
- <DT><STRONG><A NAME="item_Name%3A_windowStyle">Name: <STRONG>windowStyle</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_WindowStyle">Class: <STRONG>WindowStyle</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Switch: <STRONG>-style</STRONG></STRONG><BR>
- <DD>
- Specifies the display style to use for this window item. Must be the
- name of a <EM>window</EM> display style that has already be created with
- the <STRONG>ItemStyle</STRONG> method.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_window">Name: <STRONG>window</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Window">Class: <STRONG>Window</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dwindow">Switch: <STRONG>-window</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Alias%3A_%2Dwidget">Alias: <STRONG>-widget</STRONG></A></STRONG><BR>
- <DD>
- Specifies the sub-window to display in the item.
- <P></P></DL>
- <P>
- <H2><A NAME="window style options">Window Style Options</A></H2>
- <P><STRONG>STYLE STANDARD OPTIONS</STRONG></P>
- <P><STRONG>-anchor</STRONG> <STRONG>-padx</STRONG> <STRONG>-pady</STRONG></P>
- <P>See <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> for details of the standard options.</P>
- <P>
- <HR>
- <H1><A NAME="creating display items">CREATING DISPLAY ITEMS</A></H1>
- <P>Display items do not exist on their and thus they cannot be created
- independently of the widgets they reside in. As a rule, display items
- are created by special methods of their ``host'' widgets. For
- example, the HList widgets has a method <STRONG>item</STRONG> which can be used
- to create new display items. The following code creates a new text
- item at the third column of the entry foo inside an HList widget:</P>
- <PRE>
- my $hlist = $parent->HList(-columns=>3);
- $hlist->add('foo');
- $hlist->itemCreate('foo', 2, -itemtype=>'text', -text=>'Hello');</PRE>
- <P>The <STRONG>itemCreate</STRONG> method of the HList widget accepts a variable
- number of arguments. The special argument <STRONG>-itemtype</STRONG> specifies
- which type of display item to create. Options that are valid for this
- type of display items can then be specified by one or more
- <EM>option-value</EM> pairs.</P>
- <P>After the display item is created, they can then be configured or
- destroyed using the methods provided by the host widget. For example,
- the HList widget has the methods <STRONG>itemConfigure</STRONG>, <STRONG>itemCget</STRONG>
- and <STRONG>itemDelete</STRONG> for accessing the display items.</P>
- <P>
- <HR>
- <H1><A NAME="creating and manipulating item styles">CREATING AND MANIPULATING ITEM STYLES</A></H1>
- <P>Item styles are created with <STRONG>ItemStyle</STRONG>:</P>
- <P>
- <HR>
- <H1><A NAME="synopsis">SYNOPSIS</A></H1>
- <P> <EM>$widget</EM>-><STRONG>ItemStyle</STRONG>(<EM>itemType</EM> ?,<STRONG>-stylename</STRONG>=><EM>name</EM>? ?,<STRONG>-refwindow</STRONG>=><EM>pathName</EM>? ?,<EM>option</EM>=><EM>value</EM>, ...>?);</P>
- <P><EM>itemType</EM> must be one of the existing display items types such as
- <STRONG>text</STRONG>, <STRONG>imagetext</STRONG>, <STRONG>window</STRONG> or any new types added by
- the user. Additional arguments can be given in one or more
- <EM>option-value</EM> pairs. <EM>option</EM> can be any of the valid option
- for this display style or any of the following:</P>
- <DL>
- <DT><STRONG><A NAME="item_%2Dstylename_%3D%3E_name"><STRONG>-stylename</STRONG> => <EM>name</EM></A></STRONG><BR>
- <DD>
- Specifies a name for this style. If unspecified, then a default name
- will be chosen for this style.
- <P></P>
- <DT><STRONG><A NAME="item_%2Drefwindow_%3D%3E_%24otherwidget"><STRONG>-refwindow</STRONG> => <EM>$otherwidget</EM></A></STRONG><BR>
- <DD>
- Specifies a window to use for determine the default values of the
- display type. If unspecified, the <EM>$widget</EM> will be used. Default
- values for the display types can be set via the options database. The
- following example sets the <STRONG>-disablebackground</STRONG> and
- <STRONG>-disabledforeground</STRONG> options of a <STRONG>text</STRONG> display style via
- the option database:
- <PRE>
- $widget->optionAdd('*table.list*disabledForeground' => 'blue');
- $widget->optionAdd('*table.list*disabledBackground' => 'darkgray');
- $widget->ItemStyle('text', -refwindow => $table_list, -fg => 'red');</PRE>
- <P>By using the option database to set the options of the display styles,
- we can advoid hard-coding the option values and give the user more
- flexibility in customization. See <A HREF="../../../site/lib/Tk/option.html">the Tk::option manpage</A> for a detailed description
- of the option database.</P>
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="style methods">STYLE METHODS</A></H1>
- <P>The <STRONG>ItemStyle</STRONG> method creates an object.
- This object supports the <STRONG>configure</STRONG> and <STRONG>cget</STRONG> methods
- described in <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> which can be used to enquire and
- modify the options described above.</P>
- <P>The following additional methods are available for item styles:</P>
- <DL>
- <DT><STRONG><A NAME="item_delete"><EM>$style</EM>-><STRONG>delete</STRONG></A></STRONG><BR>
- <DD>
- Destroy this display style object.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="example">EXAMPLE</A></H1>
- <P>The following example creates two columns of data in a HList
- widget. The first column is in red and the second column in blue. The
- colors of the columns are controlled by two different <STRONG>text</STRONG>
- styles. Also, the anchor and font of the second column is chosen so
- that the income data is aligned properly.</P>
- <PRE>
- use strict;
- use Tk;
- use Tk::HList;
- use Tk::ItemStyle;</PRE>
- <PRE>
- my $mw = MainWindow->new();</PRE>
- <PRE>
- my $hlist = $mw->HList(-columns=>2)->pack;</PRE>
- <PRE>
- my $red = $hlist->ItemStyle('text', -foreground=>'#800000');
- my $blue = $hlist->ItemStyle('text', -foreground=>'#000080', -anchor=>'e');</PRE>
- <PRE>
- my $e;
- foreach ([Joe => '$10,000'], [Peter => '$20,000'],
- [Raj => '$90,000'], [Zinh => '$0']) {
- $e = $hlist->addchild("");
- $hlist->itemCreate($e, 0, -itemtype=>'text',
- -text=>$_->[0], -style=>$red );
- $hlist->itemCreate($e, 1, -itemtype=>'text',
- -text=>$_->[1], -style=>$blue);
- }</PRE>
- <PRE>
- Tk::MainLoop;</PRE>
- <P>
- <HR>
- <H1><A NAME="see also">SEE ALSO</A></H1>
- <P><A HREF="../../../site/lib/Tk/HList.html">Tk::HList</A>
- <A HREF="../../../site/lib/Tk/TixGrid.html">Tk::TixGrid</A>
- <A HREF="../../../site/lib/Tk/TList.html">Tk::TList</A></P>
- <P>
- <HR>
- <H1><A NAME="keywords">KEYWORDS</A></H1>
- <P>display item, display style, item style</P>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Tk::DItem - Tix Display Items</P></STRONG>
- </TD></TR>
- </TABLE>
-
- </BODY>
-
- </HTML>
-