>> Fastbase Business Software Ltd

Fastbase Accounting System - Online Manual

Graphic Forms (A4)

Document 103363/1

Entered Fri, 6 Jun 2003 14:58 by Peter Campbell
Updated Wed, 7 Sep 2005 12:29
Previous


First, have a look at an example form: Purchase Order (gdi)

A graphic layout will always start with the following lines, all other sections are the same.

set layout(gdi) 1
form 0,0 {}


All coordinates on a graphic form can be fractional numbers, ie: text could be written at position 10,2 or 10,2.5. This applies to all text, field and additional form commands.

The text and field commands can also have additional parameters as follows:

-bold n:
Specify the boldness, a number 0-3. 3 is boldest.

-size n:
Specify the point size, the default is 11.

-anchor w:
Specify the text anchoring. West means to the left. East means to the right. Numeric fields are often right justified, to do this use -anchor e.

-fill black:
Specify the colour of the text. Standard colour names are allowed.

-fixed 0:
Specify 1 to print with a fixed width font, defaults to "Courier".

You can alter the default font at any time by adding the following line to your code (see the Tcl/tk documentation for more information):

set layout(font) {Arial 9}

Two commands exist for drawing rectangles and placing images on the form:

gdi_rectangle x1 y1 x2 y2 [options]:
This command draws a rectangle on the page. See the GDI website for more details.
x1 & y1 represents the top left corner, xy & y2 represent the bottom right corner.
Options include -width pixles, -outline colour, -fill colour.

gdi_photo x y widthi heighti image_name:
The command places an image on the page. See the GDI website for more details.
x & y represent the position in characters, same as for text and field commands.
widthi & heighti represent the image size in inches. Any image can be scaled to any size.
image_name represents the image name. All images must be loaded into the new/images directory. All images will be prefixed with "image_".


Online documentation: enter keywords to search for: