BCGControlBar Pro for MFC
void CBCGPRibbonCategory::SetCollapseOrder ( const CArray< int, int > &  arCollapseOrder)

Defines the collapse order of category.

The library uses a smart algorithm to collapse ribbon panels and this algorithm defines the collapse order. However, you can customize this behavior by providing the category with the list of indexes of category panels.

When the category detects that it needs to collapse next ribbon panel, it looks for the next element in the specified list. If the list is empty, or you have not specified enough elements, then it uses the internal algorithm.

For example, the category has three ribbon panels and can be collapsed five times until all panels take the fully collapsed state. You can set the following collapse order: 0, 2, 2, 0. In this case the category will collapse the panel 0 two times, the panel 2 two times and the last time it will determine by itself which panel has to be collapsed.

Parameters
arCollapseOrderSpecifies the collapse order. The array should contain zero-based indexes of ribbon panels.