ValidateText

[property icon] ValidateText$

Contains the modified contents of the DBEdit control

Runtime-only String property

Applies to: KCMLEdit


[property icon] ValidateText$

Passed into the EditValidate() event

Runtime-only String property

Applies to: Grid

Introduced in KCML version 5.03


>ValidateText

ValidateText

This property applies to edit controls and editable grid cells. It is set by the client to reflect the text currently in the control only for certain events, usually the Validate() event for an edit control or the EditValidate() grid cell event. The Text$ property is not changed for these event handlers so they have the opportunity of rejecting the change. If the validation event returns TRUE (i.e. the text is valid) then the ValidateText$ property is copied to the Text$ property. If the validate event returns FALSE (i.e. the text is invalid) then no action occurs. Thus for data aware edit controls, the Text$ property always contains text that comes from the data (and is presumably valid) or text that has been validated by the validate event.

In 5.03, there are several other circumstances when the client will set the ValidateText$ property to reflect the state of the current control. These are cases where an event has been triggered for another control but the edit control still has focus (and hence no validate() event has occurred). These cases are:

Grid

This property is used by the grid controls EditValidate() and the Edit controls Validate() event handlers. If the text in a grid control cell or edit control is modified the appropriate event handler is called, if it exists. When the event handler is called this property is set to contain the current text in the control. The original text is stored in the Text$ property.

This property is set by KCML and should generally only be inspected by the event handler code. If set and the validate event handler returns FALSE then the new value will be sent back to the client which will consider the control modified thus firing another validate event. In the special case of a grid cell ServerEdit() event handler in AutoEdit mode, a program is expected to set the property to the new value.

See also

Grid methods, properties and events. KCMLEdit methods, properties and events.