ENTRY OnItemValidate(IN INT _refId, INT _row, INT _col, IN TEXT _value, BOOL _bValid) ; script actions END OnItemValidate |
ENTRY XXX_OnItemValidate(INT _row, INT _col, IN TEXT _value, BOOL _bValid) ; script actions END XXX_OnItemValidate |
| _refId | Parameter of INT type (required for global handler). |
| XXX | Name of Reference variable connected to graphic object (without the character "_"). |
| _row, _col | Row, column of the item, whose value must be validated. |
| _value | New item value. |
| _bValidate | Output parameter - value validity attribute. |
If the picture
event handler sets the output parameter to the value @False, the user cannot
carry out the change. If the picture event handler sets the output parameter
to the value @True, the change will be accepted.
When using the picture event, it allows easy performing the input check.
The Browser displays
the structured variable _rec.
ENTRY browser_OnItemValidate(INT _row, INT _col, IN TEXT _value, BOOL _bValid)
IF _col = 1 THEN
INT _val
_val := %StrToI(_value)
IF !_val\VLD THEN
_bValid := @FALSE
ELSIF _val > _row THEN
_bValid := @FALSE
ELSE
_bValid := @TRUE
_row := _row+1
IF _row > _rec\DIM THEN
_row := 1
ENDIF
ENDIF
ELSE
_bValid := @TRUE
ENDIF
END browser_OnItemValidate
BEGIN
REDIM _rec[10]
END |
ENTRY OnItemValidate(IN INT _refId, INT _row, INT _col, IN TEXT _value, BOOL _bValid) |
IF _refId = _browser THEN ;test that determines the displayer in which the event occurred |
; script actions |
ENDIF END OnItemValidate |