Line :: nextSelected - Get next selected item and reset
The function provides the next selected list item in a multi-selection or check list/tree. The selection for the list item is reset. The instance displayed in the selected item is the selected instance in the property handle for the line (property()).
The function returns true as long as an item could be provided. The function returns false, when the end of the list has been reached. After receiving the last item, all check marks in the list are reset.
When applying the function on controls, which do not display a list, the function throws an exception. When applying the function on a single-selection list, it returns one list item, if there is an item selected in the list.
... fragment (ControlContext &context) {
Line line(context);
...
while ( line.nextSelected() )
Output(line.property().value("name").toString());
...
}
A State true indicates, that the function was executed successfully. Otherwise state is false.