AnnSetGrouping example for Delphi
// This example will temporarily disable the grouping in all objects
// and re-enable the grouping later.
// Disable grouping in all groups
LEADAnn1.AnnSetGrouping (LEADAnn1.AnnContainer, False, ANNFLAG_RECURSE);
//… you can now select and change individual objects from groups
//… you can also put the two calls to AnnSetGrouping in two
//… buttons
// re-enable grouping all groups
// note that we do NOT enable grouping in the topmost container!
// if you enable the grouping in the top container, then all the
// objects will act as a group!
LEADAnn1.AnnSetGrouping (LEADAnn1.AnnContainer, True, ANNFLAG_RECURSE+ANNFLAG_NOTTHIS);