TX Text Control .NET for Windows Forms

Location Property

Property|Introduced in 10.1
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets the geometric location of the current text input position. The location is given in twips with an origin at the upper left corner of the document. The relationship between the upper left corner of the document and the upper left corner of the visible portion of the document can be obtained with the TextControl.ScrollLocation property.

Syntax

public Point Location { get; }

Examples

The following example examines or changes the insertion point in a short document by using InputPosition.Location.

textControl.Text = "Project summary";
InputPosition inputPosition = textControl.InputPosition;

Console.WriteLine($"Location: {inputPosition.Location}");
Console.WriteLine("Input Position is ready for use.");

Limitations

Read only.

Further Reading

  • Is the Current Input Position Currently Visible? –
  • Inserting a Page Break Programmatically –