TableColumn object represent the attributes of a tabulation column, i.e. all the attributes that can be modified using the EditTableColumnDlg command.
Creating a TableColumn object
TableColumn object can be obtained from a text being edited using the GetTableColumn function, e.g:
Dim objTableColumn = Text.GetTableColumn
note that the cursor should be positioned inside an editable table for this method to work.
Getting and setting properties
A TableColumn object has a number of properties, each one corresponding to a column attribute. Each one of these properties can be set - modifying the corresponding attribute - or queried - returning the value of the corresponding attribute.
When setting values, remember that you have to call explicitly the SetTableColumn command suppying modified object, e.g.
Text.SetTableColumn(objTableColumn)
When querying values, remember that these properties can also be 'without value'. This happens when the corresponding attribute has not been set, or it has multiple values, or it has been explicitly chosen as 'don't change' in a dialog.
Attempts to query the value of a property that does not have a value causes a run-time error during the execution of the script.
For each one of the properties there is a Boolean function that specifies if the corresponding property has a value. The name of these Boolean functions is the same of the properties prefixed with 'Has', so the RuleColor property holds the color of the rule and the HasRuleColor function returns true if RuleColor has a value.
Resetting local column properties
To reset local properties for the current column and let them be overridden by table properties, use Ted.EditTableMainDlg and then in the Column section, enter what you want.
Attaching object to text
In the case of the object obtained from a text using the GetTableColumn function, each attribute property has a value either if the text has no selection, or if the corresponding attribute has the same value in all the rows containing selected text
The values that are assigned to attribute properties are validated: attempts to assign invalid values causes run-time errors .