GRIDPLUS - Tags
Home Reference Manpage Examples Download License Contact

<b> </b>Set/unset bold text attribute.
<bgcolor name?:default?> </bgcolor>Set/unset background color.
<color name?:default?> </color>Set/unset foreground color.
<command command?:parameter?> </command>Define link to invoke TCL command.
<font name?:default?>Set font to fontname.
<i> </i>Set/unset italic text attribute.
<image name>Insert image identfied by name.
<image name@label>Insert image identfied by name as link to label.
<image name~command?:parameter?>Insert image identfied by name as command.
<indent size> </indent>Set indent to size.
<label label?:default?>Set label label as target for link.
<link label> </link>Define link to label.
<size size?:default?> </size>Set font size.
<tab ?number?>Insert number tab characters.
<u> </u>Set/unset underline text attribute.


<b> </b>

The <b> tag turns on the bold text attribute. The matching </b> tag turns it off.

Example:

This is a <b>bold</b> word.This is a bold word.


<bgcolor name?:default?> </bgcolor>

The <bgcolor name> tag sets the current background color to name. The </bgcolor> tag sets the current background color to the default background color. Any of the Tk named colors may be used.

The default value for the default background color is "white". To set an alternative default background color the ":default" suffix is used.

Examples:

TagExample text
<bgcolor lightgray>This has a lightgray background.
This has a lightgray background.
<bgcolor lightgray:default>Lightgray default background.
Lightgray default background.


<color name?:default?> </color>

The <color name> tag sets the current text color to name. The </color> tag sets the current text color to the default text color. Any of the Tk named colors may be used.

The default value for the default color is "black". To set an alternative default background color the ":default" suffix is used.

Examples:

Assume the current default text color is "black".

TagExample text
This is some <color green>green</color> textThis is some green text
<color green:default>Green</color> default text colorGreen default text color


<command command?:parameter?> </command>

The <command command> tag creates an command link.

The text between the <command command> and the matching </command> tags will be displayed in the current linkcolor using the current linkstyle. A single click on the hightlighted text will invoke the command.

If the optional parameter has been specified the value of the GRIDPLUS text widget will be set to parameter. If no parameter is set then the value of the GRIDPLUS text widget will be set to the text between the command tags. The value of parameter must not contain spaces.

Examples:

Assuming that the GRIDPLUS text widget is called ".mytext1" and that "-linkcolor blue" is set.

TagExample text
Link to <command myproc1>Invoke myproc1</command> commandLink to Invoke myproc1 command
<command myproc2:abc123>Invoke myproc2</color> with parameterInvoke myproc2 with parameter


<font name?:default?>

The <font name> tag sets the current font to name. The </font> tag sets the current font to the default font. Any of the Tk named fonts may be used.

The default value for the default font is "helvetica". To set an alternative default font the ":default" suffix is used.

Example:

Assume the current font is helvetica.

TagExample text
<font times>This is some textThis is some text
<font times:default>Times is now the default fontTimes is now the default font


<i> </i>

The <i> tag turns on the italic text attribute. The matching </i> tag turns it off.

Example:

This is an <i>italic</i> word.This is an italic word.


<image name>

The <image name> inserts the image identified by name into the text.

If the image name begins with with a colon (":") the name is assumed to identify an ICONS package icon; Otherwise the name must identify an image created using the Tk image create command.


<image name@label>

The <image name@label> inserts the image identified by name into the text. A single click on the image will move the display so as to put the target label as close to the top of the text widget as possible.

If the image name begins with with a colon (":") the name is assumed to identify an ICONS package icon; Otherwise the name must identify an image created using the Tk image create command.


<image name~command?:parameter?>

The <image name@label> inserts the image identified by name into the text. A single click on the image will invoke command. If the optional parameter has been specified the value of the GRIDPLUS text widget will be set to parameter. The value of parameter must not contain spaces.

If the image name begins with with a colon (":") the name is assumed to identify an ICONS package icon; Otherwise the name must identify an image created using the Tk image create command.


<indent size> </indent>

The <indent size> sets the text indent to size. The matching </indent> sets the indent size to zero.

The unit of size is 0.5 centimetres. A size of "1" will be 0.5cm, a size of "2" will be 1.0cm, a size of "3" will be 1.5cm and so on.


<label label?:default?>

The <label label> tag creates a target for a link.

Whenever the display is moved to a label, either by clicking on a link or by using the goto command/mode, the value of the global "null" named array associated with the text widget is set to the name of the label. To set a default value for this the ":default" suffix is used.

Example:

<label mylink1>


<link label> </link>

The <link label> tag creates a link to the specified label.

The text between the <link label> and the matching </link> tags will be displayed in the current linkcolor using the current linkstyle. A single click on the highlighted text will move the display so as to put the target label as close to the top of the text widget as possible.

Example:

If a text item called ".mytext" contains a...

<link mylink1>Select This</link>

...tag, a single click on the "Select This" text will move the display to the mylink1 label, and the value of "$(.mytext)" will be set to "mylink1".


<size size?:default?> </size>

The <size size> tag sets the current font size to size. The </size> tag sets the current text size to the default text size.

The default size is the size of the default font for the text widget. To set an alternative default size the ":default" suffix is used.

The size may be specified relative to the size of the current default font by using a plus ("+") or minus ("-") prefix.

Examples:

Assume the current font is 10 point times.

TagExample text
<size 12>This is some textThis is some text
<size 8>This is some textThis is some text
<size 8:default>This is some textThis is some text
<size +2>This is some textThis is some text
<size -2>This is some textThis is some text
<size -2:default>This is some textThis is some text


<tab ?number?>

The <tab number> inserts number tab characters. If number is omitted, one tab character is inserted.

Note:


<u> </u>

The <u> tag turns on the underline text attribute. The matching </u> tag turns it off.

Example:

This is an <u>underlined</u> word.This is an underlined word.


Copyright © 2004
Adrian Davis.