An instance of the Table
public sealed class TableColumnCollection: TablePartCollectionPublic NotInheritable Class TableColumnCollection
Inherits TablePartCollectionThe following example shows how to use the table column collection.
int myLastCol = myTable.Columns.Count;
TXTextControl.TableColumn myCol = myTable.Columns.GetItem(myLastCol);
TXTextControl.TableCell myCell = myTable.Cells.GetItem(1, myLastCol);
int myNewWidth = (int)(myCol.Width / 2);
textControl1.InputPosition = new TXTextControl.InputPosition(myCell.Start - 1);
if (myTable.Columns.CanAdd)
{
myCol.Width = myNewWidth;
myTable.Columns.Add(TXTextControl.TableAddPosition.After);
}Dim MyLastCol As Integer = MyTable.Columns.Count
Dim MyCol As TXTextControl.TableColumn = MyTable.Columns.GetItem(MyLastCol)
Dim MyCell As TXTextControl.TableCell = MyTable.Cells.GetItem(1, MyLastCol)
Dim MyNewWidth As Integer = CInt(MyCol.Width / 2)
TextControl1.InputPosition = New TXTextControl.InputPosition(MyCell.Start - 1)
If MyTable.Columns.CanAdd Then
MyCol.Width = MyNewWidth
MyTable.Columns.Add(TXTextControl.TableAddPosition.After)
End If| Method | Description |
|---|---|
| Add | Adds a new table column at the current text input position. |
| Copy |
Copies the elements of the collection to an array, starting at a particular index. |
| Get |
Returns an enumerator that can be used to iterate through the collection.
(Inherited from Table |
| Get |
Gets a particular table column from the collection. |
| Remove | Removes the table column at the current text input position or all selected table columns when a text selection exists. |
| Property | Description |
|---|---|
| Can |
Gets a value indicating whether a new column can be inserted at the current input position. |
| Can |
Gets a value indicating whether table columns can be removed. |
| Count | Gets the number of elements contained in the collection.
(Inherited from Table |
| Is |
Returns true if the collection is designed to be thread safe, otherwise, it returns false.
(Inherited from Table |
| Sync |
Gets an object that can be used to synchronize access to the collection.
(Inherited from Table |