company logo

ControlContext :: setText - Set control value

The function allows changing the value in the control data 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.

Implementation overview

Implementation details

  1. Set control value from data source
    ControlContext  :: setText (  )

    The function copies the data from the data source to control value. The function could be used for restoring the data in a control.

    int8  cEdit :: DoBeforeLeave() {

      Property         *value = text();

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

        setText();

    }

  2. to list
  3. Set control value from property handle
    ControlContext  :: setText ( odaba::Property &cProperty )

    The function copies the data from the property handle passed in rProperty to control value.

    • cProperty - Property handle reference
  4. to list
  5. Set control value from string
    ControlContext  :: setText ( odaba::String &sText )

    The function copies the data from the string passed in sText to control value.

    • sText - Text string
  6. to list