Livecode Wiki
Advertisement

You can mix text and tables in a single field control. First of all let's use the property inspector to create a table with cells separated by TAB.You can't write directly in the field, because the TAB would change the focus on the window.

For example:

Schermata

Lets add the vertical and horizontal lines using hGrid and vGrid properties:

set the hGrid of line 2 to -2 of field 1 to true
set the vGrid of line 2 to -2 of field 1 to true

so this is the result:

Tabelle2

Now we can set the width of the columns, and the number of columns. To achieve this just use the tabWidths property, the column after the last column must be zero width. Example:

set the tabWidths of field 1 to "30,30,30,0"

this is the result:

Tabelle3

Now we can change the distance from text before and after the table with the properties spaceBelow and spaceAbove. Example:

set the spaceBelow of line 1 of field 1 to 10
set the spaceAbove of line -1 of field 1 to 10

this is the result:

Tabelle4


Now we change the border width with borderWidth property, example:

set the borderWidth of line 2 to -2 of field 1 to 2

this is the result:

Tabelle5

We can center or indent the table with the leftIndent property, example:

set the leftindent of line 2 to -2 of field 1 to 20

this is the result:

Tabelle6

We can also decide how much cell text is distant from table borders with padding. Example:

set the padding of line 2 to -2 of field 1 to 6

This is the result:

Tabelle7
Advertisement