CanAdd Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets a value indicating whether a new column can be inserted at the current input position. This property does not check for protected TextFields and/or protected document sections. To perform this use in addition the TextControl.CanEdit property.
Syntax
public bool CanAdd { get; }Public ReadOnly Property CanAdd As BooleanExamples
The following example creates a small report table and works with its structure by using TableColumnCollection.CanAdd.
textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableColumnCollection tableColumnCollection = table.Columns;
if (tableColumnCollection.CanAdd)
{
if (!tableColumnCollection.Add(TableAddPosition.After))
{
throw new InvalidOperationException("The item could not be inserted.");
}
}textControl.Tables.Add(3, 3, 10)
Dim table As Table = textControl.Tables.GetItem(10)
Dim tableColumnCollection As TableColumnCollection = table.Columns
If tableColumnCollection.CanAdd Then
If Not tableColumnCollection.Add(TableAddPosition.After) Then
Throw New InvalidOperationException("The item could not be inserted.")
End If
End IfLimitations
Read only.