Labels.NET component > API > Methods

AddElement

int AddElement(int iElType, RectangleF fRect)

This method adds an element of type iElType at the location specified by the rectangle fRect – relative to the top left of the label.

The element types are:

 

Element

iELType

Barcode

0

Text block

1

Picture

 2

Line

3

Shape

4

Datamatrix barcode

5

Aztec barcode

6

Maxicode symbol

7

RSS barcode

8

QR Code

9

PDF417 barcode

10

GS1 Composite barcode

11

 

The rectangle dimensions are Document units. There are 300 Document units to the inch.

The value returned by the method is the element’s ID, which is required for any of the Set element property methods specified below. A return value of -1 indicates an error creating the element.

By default all elements are created using the Default element properties (such as colours and font).

 

More:

DeleteEl