Composite field methods
Composite fields provide the following methods:
- Clear()
- Disable()
- Enable()
- Fill()
- Focus()
- ForceValidate()
- Hide()
- Lock()
- RunValidate()
- Show()
- Unlock()
Clear()
The Clear() method sets each component of the composite to its cleared value. The following table lists the cleared value for standard datatypes:
Datatype |
Cleared value |
---|---|
Date |
0/0/0 |
Currency |
0 |
Integer |
0 |
Long |
0 |
String |
Empty string |
Time |
000000 which corresponds to 12:00:00 AM |
Disable()
The Disable() method makes the composite field appear in a disabled state, and prevents the user from making changes to the field.
Enable()
The Enable() method allows a previously disabled composite field to receive user input.
Fill()
The Fill() method sets each component of the composite to its filled value. The following table lists the filled value for standard datatypes:
Datatype |
Filled value |
---|---|
Date |
12/31/9999 |
Currency |
99999999999999.99999 |
Integer |
32,767 |
Long |
2,147,483,647 |
String |
The length byte (first byte) of the string is set to the storage size of the string minus 1. Each of the remaining bytes is set to string equivalent of ASCII 255. |
Time |
23:59:59 |
Focus()
The Focus() method moves the focus to the composite field.
ForceValidate()
The ForceValidate() method controls whether the validate event will occur when the focus leaves the composite field. If the validate event occurs, any validation code for the composite field will be run. This method takes one boolean parameter. Supplying the value true forces the validate event to occur. Supplying the value false clears any previous call to force the validate event to occur.
Hide()
The Hide() method causes the composite field to become invisible and inaccessible to the user.
Lock()
The Lock() method causes a composite field to become inaccessible to the user. The field's appearance will not change.
RunValidate()
The RunValidate() method causes any validation code for the composite field to be run.
Show()
The Show() method causes a previously hidden composite field to become visible and accessible to the user.
Unlock()
The Unlock() method causes a previously locked composite field to become accessible to the user.