Location Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets, in twips, the frame's current location. If the image, text frame, chart, barcode or drawing is anchored to a paragraph, the location is relative to the paragraph. Otherwise, it is relative to the document. If the frame has a horizontal alignment or if it is inserted inline, this property returns zero. This property cannot be set for images, text frames, charts, barcodes or drawings which are inserted inline.
Syntax
public Point Location { get; set; }Public Property Location As PointExamples
The following example adds a callout frame and works with it through the common frame API by using FrameBase.Location.
TextFrame callout = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout" };
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText);
FrameBase frameBase = callout;
frameBase.Location = new System.Drawing.Point(20, 20);
Console.WriteLine($"Location used by Frame Base: {frameBase.Location}");Dim callout As New TextFrame(New System.Drawing.Size(3000, 1200)) With { .Name = "Callout" }
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText)
Dim frameBase As FrameBase = callout
frameBase.Location = New System.Drawing.Point(20, 20)
Console.WriteLine($"Location used by Frame Base: {frameBase.Location}")