company logo

ControlContext :: setProperty - Set property handle for control

The function sets the property handle for the control. When the control is a complex control (tree, table or window), the data sources for all sub-ordinates controls may change as well.

In order to handle context managed data sources properly, the data source definition should define the data source as user-defined.

Notes:

It is possible eg when using virtual stacks, that a sub-ordinated ControlContext may change the current selection in the property handle. This leads to difficult to debug situations. In order to avoid this, one may use setProperty(myprop.cursorCopy()). The default behavior has the advantage to automatically change child-controls. Using a cursor copy is equivalent to checking 'Use Copy' in the field definition (Designer) datasource.

Implementation overview

Implementation details

  1. Set value as control data source
    ControlContext  :: setProperty ( odaba::Value &cValue )
    • cValue - - Title unknown
  2. to list
  3. Set property handle without auto-selection
    ControlContext  :: setProperty ( odaba::Property &cProperty )

    The function assigns the property handle passed in cProperty to the control data source.

    • cProperty - Property handle reference
  4. to list
  5. Set property handle and select instance
    ControlContext  :: setProperty ( odaba::Property &cProperty, bool bAutoSelect )

    The function assingns the property handle passed in cProperty to the control data source. In order to auto-select an instance in the property handle, bAutoSelect has to be set to true.

    • cProperty - Property handle reference
    • bAutoSelect - Position instance automatically

      In order to select the first instance in a collection, this option needs to be set to true. When passing false, the selection in the data source property remains unchanged.

  6. to list