# GUI Control - Controls Table (scripting commands)

- [ctAddHeader](../../commands/ctAddHeader.md): Adds a header line of controls according to the HeaderTemplate class. Note that rows and headers are indexed separately.
- [ctAddRow](../../commands/ctAddRow.md): Adds one row of controls according to the RowTemplate class. It returns an array containing row index and array of created controls in a format [<rowIndex>, [<control0>, <control1>...<control n>]].
- [ctClear](../../commands/ctClear.md): Removes all the lines from the RscControlsTable. Returns Nothing.
- [ctCurSel](../../commands/ctCurSel.md): Returns index of the selected row. Will take only rows, but not headers into account.
- [ctData](../../commands/ctData.md): Returns metadata associated with a particular row of a CT_CONTROLS_TABLE control.
- [ctFindHeaderRows](../../commands/ctFindHeaderRows.md): Gets array of indices of rows under this header.
- [ctFindRowHeader](../../commands/ctFindRowHeader.md): Gets index of the closest header above this row.
- [ctHeaderControls](../../commands/ctHeaderControls.md): Returns array of controls on the header with the given index.
- [ctHeaderCount](../../commands/ctHeaderCount.md): Returns number of headers (rows not included) in the RscControlsTable.
- [ctRemoveHeaders](../../commands/ctRemoveHeaders.md): Takes array of header indices as a parameter and removes headers with those indices. Indices of remaining headers will be recomputed.
- [ctRemoveRows](../../commands/ctRemoveRows.md): Takes array of row indices as a parameter and removes rows with those indices. Indices of remaining rows will be recomputed.
- [ctRowControls](../../commands/ctRowControls.md): Returns array of controls on the row with the given index.
- [ctRowCount](../../commands/ctRowCount.md): Returns number of rows (headers not included) in the RscControlsTable.
- [ctSetCurSel](../../commands/ctSetCurSel.md): Selects the line with the given index. Will take only rows, but not headers into account. -1 deselects all. Returns Nothing.
- [ctSetData](../../commands/ctSetData.md): Associates metadata (string) with the row determined by the index. Returns Nothing.
- [ctSetHeaderTemplate](../../commands/ctSetHeaderTemplate.md): Takes config path to the new header template. Clears the whole RscControlsTable and sets the new header template.
- [ctSetRowTemplate](../../commands/ctSetRowTemplate.md): Takes config path to the new row template. Clears the whole RscControlsTable and sets the new row template (Deleting all rows and headers is easier to implement than replacing the rows and filling them with new data.
- [ctSetValue](../../commands/ctSetValue.md): Associates metadata (number) with the row determined by the index. Returns Nothing.
- [ctValue](../../commands/ctValue.md): Returns metadata (number) associated with a particular row of RscControlsTable.
