company logo

ControlContext :: setVirtualType - Set type for virtual control

When a virtual control has been defined, data will be displayed according to the type of the instance currently selected in the associated data source. This happens automatically, always when changing the data source for the control or when changing the selection in the data source.

The function allows changing the form to be displayed in the control independent on the state of the data source ( e.g. when no data source has been set or when no instance is selected).

Implementation overview

Implementation details

  1. Change virtual control by type name
    ControlContext  :: setVirtualType ( odaba::String &sTypeName )

    The function changes the display of the virtual control according to the type passed in sTypeName.

    • sTypeName - Type name

      The type name is the name of a data type (usually) defined in the database. The type name might be passed as simple identifier or as scoped name with preceding namespace names separated by double colon '::'.

      In order to pass no type name, an empty string ( String() ) may be passed.

  2. to list
  3. Change virtual control by data source
    ControlContext  :: setVirtualType ( odaba::Property &cProperty )

    The function changes the display of the virtual control by extracting the type of the currently selected instance from the property passed in rProperty. When no instance is selected in the property handle, the data type of the property handle is used for setting the display type for the control.

    • cProperty - Property handle reference
  4. to list