Name

htext

htext pathName [option value...]

Create a hypertext widget window named pathName. Options may be specified on the command line or in the option database.

The contents of the hypertext widget are defined by a text string or file. Any text surrounded by two special characters (by default, %%) is interpreted as Tcl commands.

Standard Options

-background

-cursor

-exportselection

-font

-foreground

-selectbackground

-selectborderwidth

-selectForeground

-takefocus

-xscrollcommand

-yscrollcommand

 

Widget-Specific Options

-file fileName (file, File)

Specify the file containing the htext text to be displayed. See "Text Format,” later in this section.

-height amount (height, Height)

Requested height of the htext widget window.

-linespacing pixels (lineSpacing, LineSpacing)

Set the spacing between each line of text. The default is 1 pixel.

-maxheight pixels (maxHeight, MaxHeight)

Maximum height allowed for the htext widget window.

-maxwidth amount (maxWidth, MaxWidth)

Maximum width allowed for the htext widget window.

-specialchar number (specialChar, SpecialChar)

Specify the ASCII code of the character used to delimit embedded Tcl commands in htext’s text. The default is 0×25 (percent sign).

-text text (text, Text)

Specify the text to be displayed in the htext widget. See the "Text Format" section later in this chapter.

-tile imageName (tile, Tile)

Image to use as a tiled background for the widget.

-tileoffset boolean (tileOffset, TileOffset)

Whether the background tile should scroll with the widget. The default ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.