Caution: This version of this document is no longer maintained. For the latest documentation, see


Set the selection indexes


int PtTreeSetSelIndexes( 
        PtWidget_t *widget, 
        const unsigned short *buffer, 
        int count );


This function sets the selection indexes. The function assumes that buffer points to a sorted array of indexes. The first item in the widget has an index of 1, not 0.

The function returns the number of items that have been actually selected, which may be smaller than count if the array isn't sorted or contains duplicate indexes or indexes out of range.

Note that if the selection mode is Pt_RANGE_MODE, only the first index and the count are used.



Interrupt handler No
Signal handler No
Thread No

See also:

PtTree, PtTreeClearSelection(), PtTreeGetCurrent(), PtTreeGetSelIndexes(), PtTreeGoto(), PtTreeItem_t, PtTreeSelect(), PtTreeSelectedItems(), PtTreeUnselect(), PtTreeUnselectNonBrothers()