Activate Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Activates the text frame. The text frame receives the input focus. A text frame can only be activated, if the text part that contains the text frame has the input focus.
Syntax
public bool Activate();Public Function Activate() As BooleanReturn Value
The return value is true, if the text frame could be activated. Otherwise it is false.
Examples
The following example applies bold formatting through the text frame's selection by using TextFrame.Activate.
Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;
if (textFrame.Activate())
{
Console.WriteLine("Activate completed successfully.");
}Dim formattedSelection As Selection = textFrame.Selection
formattedSelection.Bold = True
textFrame.Selection = formattedSelection
If textFrame.Activate() Then
Console.WriteLine("Activate completed successfully.")
End If