company logo

GUIBaseContext :: doAfterDataSet - Line fill data post-event handler

The handler is called after a line in a tree or list has been filled ( DEV_AfterDataSet event). The handler allows setting line decorations or text colors. The property handle for the currently selected instance can be provided by calling property() . In some cases, the collection referenced by the property is located, but not selected. In order to access property instance data, the property has to be read (see example below).

The function is also called for static lines in trees. In this case, no instance is selected in the property handle. In order to determine, whether the current line is a static line or not, one may call lineType() .

When updating items for a list of a combo-box, the function returns the property handle for the list rather than the property handle for the combo box data source.

... myControlContext::doAfterDataSet() {

  Property    data = property();

  Layout      lo = line.layout();

  if ( lineType() == LineTypes::Data ) // process data lines, oly

    if ( data.located() ) {            // property handle has to be located

      if ( !data.selected() )          // data has not yet been read

        data.get();

      // select proper line font in line (layout)

      line().setLayout(layout);

    }

}

Implementation details

int32 GUIBaseContext  :: doAfterDataSet (  )