company logo

ControlContext :: loadControl - Load control

The function loads the control with the resource name passed in sCrontrol defined in design class sClassName and shows it at the position as passed in cPoint. Field properties are set by the function as follows:

  • data source: inherits from current control, but can be set by context function as well
  • sizing: growing in both directions when parent is a grid control, control size otherwise
  • position: grid position when parent is grid control, absolute position otherwise
  • margins: none
  • In order to change the data source, property() can be called after loading the control.
Return value:  Control context ( odabagui::ControlContext & )

ControlContext classes are created for field (ADK_Field) as well as for control (ADK_FieldControl) resources.

When referring a field resource, the field context will overload the context implemented for the subordinated field control (control context).

Implementation details

odabagui::ControlContext & ControlContext  :: loadControl ( odaba::String &sClassName, odaba::String &sControl, odabagui::Point &cPoint )
  • sClassName - Class name

    The class name is the name of an implementation class (usually) defined in the database. Class names must not exceed 40 characters.

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

  • sControl - Control name

    The control name is the name of the control resource as being defined within the parent control.

    "city"         // search city control in current control

    "..city"       // search city control in parent-parent-control

    "address.city" // search city control in subordinated address form

  • cPoint - Constant area position