Get the length of the specified field.
Function GetLength(cursor As CursorPos, length As Long) As Long
Parameters
No | Name | Type | Optional | Default | Description |
---|---|---|---|---|---|
1 | cursor | CursorPos | No | - | Position inside the field for which to retrieve the length |
2 | length | Long | No | - | On success will contain the length of the field in characters. In the case of an error, the contents of this parameter are undefined |
Return Code | Description | ||||
JGS_OK | The field length was found | ||||
JGS_PARAMETERERROR | Missing or invalid parameter | ||||
JGS_NOTCONNECTED | Your application is not connected to any valid session | ||||
JGS_POSITIONERROR | The specified position in the screen is invalid | ||||
JGS_SYSERROR | The function failed due to a system error | ||||
JGS_NOFIELD | The position was not inside a field or the screen is unformatted | ||||
JGS_ZEROLENFIELD | The specified field has a length of 0 |
Sample Code
Dim myPos as CursorPos
Dim myLength as Long
Dim result as Long
myPos.row = 18
myPos.column = 45
result = field.GetLength(myPos, myLength)
If result = JGS_OK then
... ' myLength contains length of field
Else ...
QWS3270 Automation copyright © Jolly Giant Software Inc. All rights reserved.