Contents
- Index
HTML support for form controls
Buttons, check boxes, radio buttons, check groups, and label controls all support a "mini" subset of HTML
This enhances the usability of these controls. For example:
1. Ability to add pictures
2. Ability to have multi line captions
3. Ability to have different color text (and font etc) for separate lines/words
4. Ability to have "colored" buttons
5. Ability to have "hyper links" inside captions
With a bit of imagination I am sure you will see others
For example, if you wanted a yellow button then the button caption would be something like:
<BODY bgcolor="clYellow"><P align="center"><br>Yellow button<br><br></p> |
And to show an image on a button the code would be something like:
<P align="center"><IMG src="file://c:\temp\hq.gif" align="middle"> HQ cache</p> |
However, in most cases you probably won't want to use explicit file paths for your images, as other users of your macro won't necessarily have the same folder structure as you. GSAK supports the use of the two system variables $_AppData and $_ExePath in control captions.
So you would normally use GSAK system variables to reference your images. You would then update your caption property in your control accordingly. So let us say the image file "hq.gif" is in your "Macros" folder, then your button caption would be:
<P align="center"><IMG src="file://$_AppData\Macros\hq.gif" align="middle"> HQ cache</p> |
The subset of HTML support includes :
B : Bold tag
<B> : start bold text
</B> : end bold text
Example : This is a <B>test</B>
U : Underline tag
<U> : start underlined text
</U> : end underlined text
Example : This is a <U>test</U>
I : Italic tag
<I> : start italic text
</I> : end italic text
Example : This is a <I>test</I>
S : Strikeout tag
<S> : start strike-through text
</S> : end strike-through text
Example : This is a <S>test</S>
A : anchor tag
<A href="value"> : text after tag is an anchor. The 'value' after the href identifier is the anchor. This can be an URL (with ftp,http,mailto,file identifier) or any text.
Examples : This is a <A href= "mailto:myemail@mail.com ">test</A>
This is a <A href="http://www.gsak.net">test</A>
FONT : font specifier tag
<FONT face='facevalue' size='sizevalue' color='colorvalue' bgcolor='colorvalue'> : specifies font of text after tag.
with
* face : name of the font
* size : HTML style size if smaller than 5, otherwise pointsize of the font
* color : font color with either hexadecimal color specification or Borland style color name, ie clRed,clYellow,clWhite ... etc
* bgcolor : background color with either hexadecimal color specification or Borland style color name </FONT> : ends font setting
Examples : This is a <FONT face="Arial" size="12" color="clred">test</FONT>
This is a <FONT face="Arial" size="12" color="#FF0000">test</FONT>
P : paragraph
<P align="alignvalue" [bgcolor="colorvalue"] [bgcolorto="colorvalue"]> : starts a new paragraph, with left, right or center alignment. The paragraph background color is set by the optional bgcolor parameter. If bgcolor and bgcolorto are specified,
a gradient is displayed ranging from begin to end color.
</P> : end of paragraph
Example : <P align="right">This is a test</P>
Example : <P align="center">This is a test</P>
Example : <P align="left" bgcolor="#ff0000">This has a red background</P>
Example : <P align="right" bgcolor="clYellow">This has a yellow background</P>
Example : <P align="right" bgcolor="clYellow" bgcolorto="clred">This has a gradient background</P>*
HR : horizontal line
<HR> : inserts linebreak with horizontal line
BR : linebreak
<BR> : inserts a linebreak
BODY : body color / background specifier
<BODY bgcolor="colorvalue" [bgcolorto="colorvalue"] [dir="v|h"] background="imagefile specifier"> : sets the background color of the HTML text or the background bitmap file
Example : <BODY bgcolor="clYellow"> : sets background color to yellow
<BODY background="file://c:\test.bmp"> : sets tiled background to file test.bmp
<BODY bgcolor="clYellow" bgcolorto="clWhite" dir="v"> : sets a vertical gradient from yellow to white
IND : indent tag
This is not part of the standard HTML tags but can be used to easily create multicolumn text
<IND x="indent"> : indents with "indent" pixels
Example :
This will be <IND x="75">indented 75 pixels.
IMG : image tag
<IMG src="file://" [align="Top|Middle|Bottom"] [width="width"] [height="height"] > : inserts an image at the location
Supported image types: BMP, GIF (png is supposed to be supported but I get "unsupported image format when I tested this)
Optionally, an alignment tag can be included. If no alignment is included, the text alignment with respect to the image is bottom. Other possibilities are : align="top" and align="middle"
The width & height to render the image can be specified as well.
Example : This is an image <IMG src="file://c:\my documents\test.bmp">
SUB : subscript tag
<SUB> : start subscript text
</SUB> : end subscript text
Example : This is <SUP>9</SUP>/<SUB>16</SUB> looks like 9/16
SUP : superscript tag
<SUP> : start superscript text
</SUP> : end superscript text
UL : list tag
<UL> : start unordered list tag
</UL> : end unordered list
Example : <UL>
<LI>List item 1
<LI>List item 2
<UL>
<LI> Sub list item A
<LI> Sub list item B
</UL>
<LI>List item 3
</UL>
LI : list item
<LI [type="specifier"] [color="color"] [name="imagename"]> : new list item
specifier can be "square" or "circle". bullet color sets the color of the square or circle bullet.
SHAD : text with shadow
<SHAD> : start text with shadow
</SHAD> : end text with shadow
Z : hidden text
<Z> : start hidden text
</Z> : end hidden text
HI : highlight
<HI> : start text highlighting
</HI> : stop text highlighting
E : Error marking
<E> : start error marker
</E> : stop error marker
Special characters
Following standard HTML special characters are supported :
< : less than : <
> : greater than : >
& : &
" : "
: non breaking space
™ : trademark symbol
€ : euro symbol
§ : section symbol
© : copyright symbol
¶ : paragraph symbol |
HTML support also allows you to reference GSAK internal icons. An example of a GSAK OK button :
CODE
<img src="idx:0" align="middle">OK
Where "idx:" stands for index and then follows the image number for that index
This enables your forms to use standard GSAK icons (without having to fuss with file path names) to provide a consistent interface with native GSAK. It also means that if GSAK changes an icon your macros will automatically follow suit without need for an update.
Internal icons at the time of writing this help file:
Note: The screen shot above is the result of a maco. Running this macro allows the most current icons to be shown. You can find this macro here
|