Grid Works home page

Overview

Components
TgwGrid

Classes
TgwGridObject
TgwCell
TgwRow
TgwColumn

Additional Information
Grid Options
HTML Reference
Tips & Tricks

Feedback
Report a bug with this manual

How do you rate this manual?
Great
OK
Poor

Comments


Best viewed with
Microsoft Internet Explorer
Grid Works HTML Reference

Easy formatting with HTML Grid Works supports a subset of the HyperText Markup Language (HTML). HTML may be used to easily format the contents of a cell and to define "anchors", areas within a cell which generate events when clicked.

Cell contents may also be formatted using the owner draw capabilities of Grid Works.

The following HTML commands are supported :-


<B> </B> Bold on and off
<I> </I> Italic on and off
<U> </U> Underline on and off
<S> </S> Strikeout on and off
<FONT> </FONT> Specify font face, size and color
<IMG> Display an image
<A> </A> Define a clickable hotspot (HTML anchor)
<BLINK> Turn blinking on
<P> Begin a new paragraph
<BR> Begin a new line
<NOBR> </NOBR> Turn word wrap off or on
<X> Set X position
<Y> Set Y position



<B> </B> Bold on and off

Use this HTML command to turn bolding on and off.

Example Display "This is some Bold text" in cell[0,0]
Cell[0,0].Text := 'This is some <B>Bold</B>text'


<I> </I> Italic on and off

Use this HTML command to turn italics on and off.

Example Display "This is some Italic text" in cell[0,0]
Cell[0,0].Text := 'This is some <I>Italic</I>text'


<U> </U> Underline on and off

Use this HTML command to turn underlining on and off.

Example Display "This is some Underlined text" in cell[0,0]
Cell[0,0].Text := 'This is some <U>Underlined</U>text'


<S> </S> Strikeout on and off

Use this HTML command to turn strikeout on and off.

Example Display "This is some Struckout text" in cell[0,0]
Cell[0,0].Text := 'This is some <S>Struckout</S>text'


<FONT> </FONT> Specify font face, size and color

Use this HTML command to specify font typeface, size and color.

Example Changing the typeface using the FACE attribute.
E.g., to display "This is some Times New Roman text" in cell[0,0]
Cell[0,0].Text :=
   'This is some <FONT FACE="TIMES NEW ROMAN">Times New Roman</FONT>text'

Example Changing the size using the SIZE attribute.
E.g., to display "This is some Small text" in cell[0,0]
Cell[0,0].Text :=
   'This is some <FONT SIZE="1">Small</FONT>text'

Example Specifying the size in points using the POINTSIZE attribute.
Cell[0,0].Text :=
   'This is some <FONT POINTSIZE="10">10 point</FONT>text'

Example Changing the foreground color using the COLOR attribute.
E.g., to display "This is some Red text" in cell[0,0]
Cell[0,0].Text :=
   'This is some <FONT COLOR="#FF0000">Red</FONT>text'

Example Changing the background color using the BGCOLOR attribute.
Cell[0,0].Text :=
   'This is some <FONT BGCOLOR="#FF0000">Black on red</FONT>text'

Example The attributes may be combined.
E.g., to display "This is some Small red text" in cell[0,0]
Cell[0,0].Text :=
   'This is some <FONT SIZE="1" COLOR="#FF0000">Small</FONT>text'


<IMG> Display an image

Use this HTML command to display an image (bitmap) in a cell. You can also display bitmaps using the Bitmap property of a cell.

Example Display the resource bitmap named "mybitmap" in cell[0,0] using the RESOURCE attribute
Cell[0,0].Text := '<IMG RESOURCE="mybitmap">'

Example Display bitmap #1 from the TImageList named "ImageList1" in cell[0,0] using the IMAGELIST and INDEX attributes. (NB: The TImagelist must be on the same form as the grid)
Cell[0,0].Text := '<IMG IMAGELIST="ImageList1" INDEX="1">'

Example Display the TImage named "Image1" in cell[0,0] using the IMAGE attribute. (NB: The TImage must be on the same form as the grid)
Cell[0,0].Text := '<IMG IMAGE="Image1">'


<A> </A> Define a clickable hotspot (HTML anchor)

Use this HTML command to define a HTML anchor, an area that generates an event when clicked. A cell may contain multiple anchors

Example Define an anchor around the word 'World' that will generate the OnAnchorClicked event when clicked. The string 'MyText' will be passed to the event
Cell[0,0].Text := 'Hello <A MyText>World</A>'


<BLINK> Turn blinking on

Use this HTML command to make the cell blink.

Example Make cell[0,0] blink "Hello World"
Cell[0,0].Text := '<BLINK> Hello World'


<P> Begin a new paragraph

Use this HTML command to begin a new paragraph. Paragraphs are separated by a blank line


<BR> Begin a new line

Use this HTML command to begin a new line.


<NOBR> </NOBR> Turn word wrap off or on

Use this HTML command (NOBR stands for "No line breaking") to turn word wrap off and on. By turning word wrap off you can prevent a line of text from "breaking" (word wrapping) regardless of how long it is. If the text is too wide to fit in the cell it will be truncated. Word wrap is turned on by default so to turn it off you must use the <NOBR> command.

Example Display "This line will not wrap" without it wrapping
Cell[0,0].Text := '<NOBR>This line will not wrap';


<X> Set X position

Use this HTML command to position the "cursor" at a specific horizontal pixel within the cell. Subsequent output will take place at that position.

NB: This command is not part of standard HTML so don't expect it to work if you export a grid to HTML and try to view it in a browser.


Example Make cell[0,0] display "Hello" followed by "World" at 300 pixels from the left hand edge of the cell
Cell[0,0].Text := 'Hello <X 300>World'


<Y> Set Y position

Use this HTML command to position the "cursor" at a specific vertical pixel within the cell. Subsequent output will take place at that position.

NB: This command is not part of standard HTML so don't expect it to work if you export a grid to HTML and try to view it in a browser.


Example Make cell[0,0] display "Hello" followed by "World" at 150 pixels from the top of the cell
Cell[0,0].Text := 'Hello <Y 150>World'



Copyright © 1998-2007 Innova Software ALL RIGHTS RESERVED
All trademarks are the property of their respective owners.
Webmaster webmaster@innovasoftware.com