Deutsches 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 wuold change the focus on the window.

For example:

Le'ts 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:

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 tha last column must be zero width. Example:

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

this is the result:

Now we can change the distance form 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:


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:

We can ceter 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:

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:

Advertisement