Window field methods
Window fields provide the following methods:
- Clear()
- Disable()
- Enable()
- Fill()
- Focus()
- ForceValidate()
- Hide()
- Lock()
- RunValidate()
- Show()
- Unlock()
Clear()
The Clear() method sets the field 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 field appear in a disabled state, and prevents the user from making changes to the field.
Enable()
The Enable() method allows a previously disabled field to receive user input.
Fill()
The Fill() method sets the field 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 field.
ForceValidate()
The ForceValidate() method controls whether the validate event will occur when the focus leaves the field. If the validate event occurs, any validation code for the 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 field to become invisible and inaccessible to the user.
Lock()
The Lock() method causes a field to become inaccessible to the user. The field's appearance will not change.
RunValidate()
The RunValidate() method causes any validation code for the window field to be run.
Show()
The Show() method causes a previously hidden field to become visible and accessible to the user.
Unlock()
The Unlock() method causes a previously locked field to become accessible to the user.