company logo

ControlContext :: text - Text property

The property provides the text currently entered in the controls text area. This might be different from the value in the related property handle, since the control value might not yet be stored. Values are stored to the property handle area when leaving the control.

Thus, a doBeforeLeave() handler might access the entered text in order to check the new value before being stored to the property handle.

int8  cEdit :: DoBeforeLeave() {

  Property         *value = text();

  if ( !checkValue(*value) )  // restore old value in case of error

    setData();

}

Return value:  Propery handle ( odaba::Property & )

Implementation details

odaba::Property & ControlContext  :: text (  )

The function returns the text currently entered in the control data area.