newObjects Active Label Label object

Obtained from the VisiLabel object:
lbl = VisiLabel.Label;
The Label object exposes the label format properties. Through its properties the application can set/get the label size, margins and other parameters. The size of the label defines the size of the surface on which drawing objects can be viewed or printed. The size is specified in the units specified by the Misc.Units property. By default 1 = 1/100 millimeters. 

The figure below shows the properties responsible for the label size and margins

Members reference:

Properties
Width Long Integer. Gets/Sets the width of the label (see units) 
Syntax:
obj.Width = 10000; // Set width to 10 cm.
curWidth = obj.Width;
See also Height.
Height Long Integer. Gets/Sets the height of the label (see units) 
Syntax:
obj.Height = 5000; // Set width to 5 cm.
curWidth = obj.Width;
Remarks:
The Width and Height properties specify the size of the actual label - the printable area. It is not forbidden to put drawing objects/elements outside it, but they will not appear when the label or label sets are printed. On the screen the elements outside the label can be shown or hidden as preferred by using the Misc.HideNonPrintable property.
On WEB pages there is a little sense in putting anything outside the label (printable area) borders, but in applications such as Active Label Browser it can be used to hold help, hints, links and other elements that you want to be visible on the screen for user convenience, but not printed when it comes to that.
The coordinates of all the drawing objects/elements are relative to the upper left corner of the label - see Label coordinate space
See also LeftMargin and RightMargin.
LeftMargin Each of these properties is Long Integer value in the current measurement units (see Misc.Units).
Syntax:
obj.LeftMargin = 1000; // 1 cm margin
Remarks:
The margins define the empty space on each side of the label. Only the area inside the margins is printed any element or part of element that is outside the margins is not printed (see also Misc.HideNonPrintable). While the label coordinate system begins at the actual left upper corner of the label the printable area is usually smaller than the entire label itself. This approach has been chosen because most label papers have rounded corners and sometimes the low resolution printers (for instance some of the thermal printers) are not absolutely accurate when they scroll the paper. Thus an error of about a millimeter can be expected. It is recommended to use margins of about 2-3 mm (values between 200 and 300).
TopMargin
RightMargin
BottomMargin
BackStyle Long integer. Specifies the background style of the label.
Syntax:
obj.BackStyle = -1; // Solid fill
v = obj.BackStyle;

Remarks:
Supported styles are:
-1 - solid (default)
0 - horizontal hatching
1 - vertical hatching
2 - diagonal left to right hatching
3 - diagonal right to left hatching
4 - cross (horizontal and vertical) hatching
5 - diagonal cross
BackColor Specifies the background color of the label. See Active Label colors.
Syntax:
obj.BackColor = 0x0000FF; // Sets the background color to red
v = obj.
BackColor;
BorderStyle Long integer. Specifies the line style used for label border.
Syntax:
obj.BorderStyle = 1; // Dashed line
v = obj.BorderStyle;

Remarks:
The supported line styles are:
0 - solid (default)
1 - dashed
2 - dotted
3 - dash dot
4 - dash dot dot
5 - none
6 - solid inside frame (makes sense for closed shapes only - the line is solid but is drawn inside the shape and not over the shape borders).
The border is drawn at the margins (if visible)
BorderColor Specifies the color for the label border. See Active Label colors.
Syntax:
obj.BorderColor = 0x00FF00; // Sets the color to green
v = obj.BorderColor;
Remarks:
The border is drawn at the margins (if visible)
BorderWidth Long integer. Specifies the line thickness of the label border.
Syntax:

obj.BorderWidth = 0; // Thin 1 pixel line
obj.BorderWidth = 100; // 1 mm thick line
v = obj.BorderWidth;
Remarks:
The border is drawn at the margins (if visible)
ForeColor
VisiLabel Returns the VisiLabel object on which the element resides.
Methods
ShowProperties Syntax:
obj.ShowProperties();
Shows the property sheet for the label size and design.

Remarks: 

 

 

 

newObjects Copyright 2001-2006 newObjects [ ]