←Select platform

NameOffset Property

Summary

Gets or sets the name offset relative to the upper left corner of the bounding rectangle of this AnnObject.

Syntax

C#
VB
C++
public virtual AnnPoint NameOffset { get; set; } 
  
Public Overridable Property NameOffset As Leadtools.Annotations.AnnPoint 
public: 
virtual property Leadtools.Annotations.AnnPoint NameOffset { 
   Leadtools.Annotations.AnnPoint get(); 
   void set (    Leadtools.Annotations.AnnPoint ); 
} 

Property Value

The name offset relative to the upper left corner of the bounding rectangle of this AnnObject.

Remarks

The automation mode uses this property when you click and drag the name of an object around. Setting this property to an empty point, puts the name back at the upper left corner of the bounding rectangle of this AnnObject. For more information, refer to Annotation Object Names. (Deprecated)

Example

This example sets the names of all objects in a container to be visible, at the upper-left corner of the image, and to have white text over a blue background with an Arial 11-point font.

C#
VB
using Leadtools; 
using Leadtools.Annotations; 
using Leadtools.Codecs; 
using Leadtools.WinForms; 
using Leadtools.Drawing; 
 
public void AnnObject_NameOffset(AnnContainer container) 
{ 
   AnnFont font = new AnnFont("Arial", new AnnLength(11, AnnUnit.Point), FontStyle.Regular); 
 
   foreach (AnnObject obj in container.Objects) 
   { 
      obj.NameVisible = true; 
      obj.NameOffset = AnnPoint.Empty; 
      obj.NameForeColor = Color.White; 
      obj.NameBackColor = Color.Blue; 
      obj.NameFont = font; 
   } 
} 
Imports Leadtools 
Imports Leadtools.Annotations 
Imports Leadtools.Codecs 
Imports Leadtools.WinForms 
Imports Leadtools.Drawing 
 
Public Sub AnnObject_NameOffset(ByVal container As AnnContainer) 
   Dim font As AnnFont = New AnnFont("Arial", New AnnLength(11, AnnUnit.Point), FontStyle.Regular) 
 
   For Each obj As AnnObject In container.Objects 
      obj.NameVisible = True 
      obj.NameOffset = AnnPoint.Empty 
      obj.NameForeColor = Color.White 
      obj.NameBackColor = Color.Blue 
      obj.NameFont = font 
   Next obj 
End Sub 

Requirements

Target Platforms

See Also

Reference

AnnObject Class

AnnObject Members

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations Assembly