company logo

ControlContext :: expandToItem - Expand tree for selected item

The function expands the tree for the item passed to the function. In order to refresh the list before searching the item true should be passed in bRefresh . Passing false , the function will refresh the list, only, when the collection has changed, i.e. when items have been inserted to or removed from the collection, but not, when instance data has changed, only.

Implementation overview

Implementation details

  1. Expand item hierarchy by key
    ControlContext  :: expandToItem ( odaba::StringList &sItemKeys, bool bRefresh )

    The function expands the item hierarchy as passed in sItemKeys . The item keys passed have to correspond to the item text displayed in the tree. In case of multiple column trees, the key corresponds to the value in first column.

    • sItemKeys - Item key list

      An item key list should contain all information for identifying an item within an GUI object, especially within a tree or list control.

      The simple way is to list the "keys", one for each tree level (the content displayed in first column). Because this content can be duplicate within the tree or list, the more secured way is to precede each "key value" with the name of the region, it belongs to (see example).

      "person(Mueller).children(Anton).children(Anna)"

      "Mueller,Anton,Anna"

    • bRefresh - Refresh option

      In order to refresh the content of a control, this option should be set to true .

  2. to list
  3. Expand tree for item selected in the property handle
    ControlContext  :: expandToItem ( odaba::Property &cProperty, bool bRefresh )

    The function tries to locate the item selected in the property handle passed in rProperty . The property handle passed must be a property handle, which is part of the tree property handle hierarchy ( property() or currentProperty() ).

    • cProperty - Property handle reference
    • bRefresh - Refresh option

      In order to refresh the content of a control, this option should be set to true .

  4. to list