Properties |
Name |
Read/Write, String
Sets/gets the field name
Syntax:
f.Name = "MyField";
var str = f.Name;
objVisiLabel.Variables("MyField").Name = "NewNameForTheField";
Remarks:
In Active Label 1.0 the field names are not important for
the internal functionality. For example the data supplied by CACHEDATA
text commands is distributed in the same order in which it
appears (i.e. the first value to the first field, the second
value to the second field and so on). The same is true also when
working with databases. However the field names can be quite
helpful when you need to access them programmatically. |
Exclude |
Not supported in version 1.0 |
Size |
Read/Write, long integer
Gets/sets the size of the field. Custom sizes can be set to
String fields only.
Syntax:
f.Type = 8; // String
f.Size =44; // 44 characters max
var fldSize = f.Size;
objVisiLabel.Variables("MyField").Size = somesize;
Remarks:
The size must be set when you create string fields, otherwise it
is already known from the field type and cannot be actually
changed. See also Type. |
Type |
Read/Write, long integer
Sets/Gets the field type.
Syntax:
f.Type = 5; // Make the field of the double precision floating
point number type.
var t = f.Type;
var t = objVisiLabel.Variables("MyField").Type;
Remarks:
When in CacheMode
changing the field type or size will reset the cache contents. |
Element |
Read/Write, String
Sets/gets the name of the graphical element to which this field
is bound.
Syntax:
f.Element = "MyTextLabel";
var elName = f.Element;
Remarks:
The data fields from the Active Label's internal data source are
bound to elements on the label by name. This property tells the
field which graphical element should be changed when the data is
navigated (See also Property). |
Property |
Read/Write, String
Sets/gets the name of the property of the element (see Element)
to which this field is bound.
Syntax:
f.Element = "MySimpleTextLabel";
f.Property = "Text";
var prop = f.Property;
Remarks:
One field can be bound to only one element on the label and one
property of that element. As the binding is textual - by name
the operation does not require you to browse programmatically
the entire object model - it is enough to know the names. The
bounding can be established from the element's property sheets (Data
connection property page). When you want to implement your
own data binding user interface or create the bindings in some
automatic fashion you use the Element and the Property
properties of the Field objects to create the bindings. |
Value |
Read/Write, Default, Variant
Sets/gets the field's value. When set it causes a script error
if the value being set cannot be converted to the field type.
Syntax:
f.Value = "New value";
objVisiLabel.Variables("MyField") = 3;
var val = objVisiLabel.Variables("MyField").Value;
Remarks:
An Empty value can be assigned to any field type. Some languages
have reserved word for the empty values (Empty in VB/VBScript).
You can use Reset if the language you use
does not offer a more convenient way to set the field
empty. |
Methods |
ShowProperties |
The method is supported but does
nothing in version 1.0 (no property pages are available for the
Field objects alone - however they can be edited through the
Property sheets of the Variables
object). |
UpdateObject |
No need to call this method
directly, it is automatically called on each field when the
Variables.UpdateLabel
is called.
Syntax:
f.UpdateObject(o);
Parameters:
o - an object
Remarks:
Attempts to set the property of the object which is named as
specified by the Property to the value
contained in the field. |
Reset |
Resets the field value.
Syntax:
f.Reset();
Remarks:
Sets the field empty |
ReadObject |
No need to call this method
directly, it is automatically called on each field when the
Variables.ReadLabel is
called.
Syntax:
f.ReadObject(o);
Parameters:
o - an object
Remarks:
Attempts to read the property of the passed object which is
named as specified by the Property into
the field's value. |