interface data_table insert column
Allows you to insert columns in a data table field.
Format:
interface data_table insert column |
|---|
data_table_name = | an existing GI_data_table |
width = | integer |
label = | string |
index = | integer |
value_type = | text_type : string/integer/real/default |
db_object_type = | Ent |
push_button_label = | string |
push_button_command = | string |
option_menu_choices = | string |
option_menu_command = | string |
toggle_button_label = | string |
toggle_button_command = | string |
Example:
1. Default Column
interface data_table insert column & |
|---|
data_table_name = | .gui.param.dtable & |
width = | 3 & |
label = | length & |
index = | 1 |
2. Column cell value as Integer
interface data_table insert column & |
|---|
data_table_name = | .gui.param.dtable & |
width = | 3 & |
label = | length & |
index = | 1 & |
value_type = | integer |
3. Column cell as push button widget
interface data_table insert column & |
|---|
data_table_name = | .gui.param.dtable & |
width = | 3 & |
label = | length & |
index = | 1 & |
push_button_label = | "Modify" & |
push_button_command = | "marker modify marker_name=%1 location=%2,%3,%4" |
Description:
Parameter | Value Type | Description |
|---|
data_table _name | An Existing GI_data_table | Specifies the name of an existing data table. |
width | Integer | Specifies the width of a column. |
label | String | Specifies the column label. |
index | Integer | Specifies the column index. |
value_type | text_type | Specifies column's cell text as string, integer, real or default. |
Column as database object |
db_object_type | Ent | Specifies the entity type for column. |
Column as push button |
push_button_label | String | Specifies push button label for column. |
push_button_command | String | Specifies the command to be executed on push button click. |
Column as option menu |
option_menu_choices | String | Specifies option menu choices for column on option change. |
option_menu_command | String | Specifies the command to be executed. |
Column as toggle button |
toggle_button_label | String | Specifies toggle button label for column on toggles buttons state change. |
toggle_button_command | String | Specifies the command to be executed. |
Extended Definition:
1. After creating the data table, the rows and columns can be created by using the ‘insert’ command.
2. The width of a column can be specified by the parameter 'width', similar to a spreadsheet. The width can also be entered in mm or inches as desired.
3. The column can be labelled via the parameter 'label'. Moreover, the column can be directly accessed using its index. The index of a column identifies its location similar to a 'label'.
4. Different data (value) types can be set per column. Data types are String, Integer, Real and Default. Cell validation is based upon this setting. To set data type for a column set value_type as
a. String: This accepts only alpha numeric character string where first character is not a number or a special character.
b. Integer: This accepts only integer value.
c. Real: This accepts floating value and integer value.
d. Default: This accepts all types (except widgets). Cell validation will NOT happen in this case.
5. Apart from basic data types, column can be of type Widgets.
■value_type and widgets are mutually exclusive to each other.
■Adams command can be associated with Widget type column.
■Adams command will be executed on Widget click operation.
■Adams command is single line command and is same for all widgets in that column.
■Column's cell values of that row can be used using %1, %2, %3 and so on, while writing Adams command for Widget. Here, %1 is associated with the first cell of that row and %2 is associated with the second cell of that row, and so on.
■Modifying column's Widget property will reset values of that Widget.
■Following widgets can be used.
a. DB object: Data table cell can accept exiting DB object.
On this object, standard RMB operations will be available.
b. Option Menu: Data table cell act as option menu.
c. Push Button: Data table cell act as push button.
d. Toggle Button: Data table cell act as toggle button.
Value of toggle button is "on" or "off".
Tips:
If the index of a column to be created already exists, then the existing column is shifted to the n+1th index, where, n is the original index of the column.
To get the value of cells/widgets in CMD language use following function:
TABLE_GET_CELLS (table_name, start_row_index, end_row_index, start_column_index, end_column_index, "blank", 0))
Users can set cell of the table using following Adams command:
"interface data_table set cell data_table_name= DATA_TABLE row_index=index column_index=index string='value' "