Gets the bounding rectangle of the text belonging to the line. The values are 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 Rectangle TextBounds { get; }
Public ReadOnly Property TextBounds() As Rectangle

Examples

The following example uses the 'TXTextControl.Line.baseLine' property to get the values of the bounding rectangle of the text belonging to the line.

textControl1.Text = "Line 1\nLine 2\nLine 3"; 

foreach (TXTextControl.Line _line in textControl1.Lines) {
        System.Console.WriteLine(_line.Baseline.ToString());
        }
TextControl1.Text = "Line 1" & vbLf & "Line 2" & vbLf & "Line 3"

For Each _line As TXTextControl.Line In TextControl1.Lines
    System.Console.WriteLine(_line.Baseline.ToString())
Next

Limitations

Read only.