method Items.UndefineSummaryBars (SummaryItem as HITEM, SummaryKey as Variant, ItemRemove as HITEM, KeyRemove as Variant)
Undefines the bars in a summary bar

TypeDescription
SummaryItem as HITEM A long expression that specifies the handle of the item that displays the summary bar. 
SummaryKey as Variant A VARIANT expression that indicates the key of the summary bar.
ItemRemove as HITEM A long expression that specifies the item that holds the bar being removed from the summary bar. The ItemRemove parameter could be 
  • a valid handle, indicating the item itself
  • 0 indicates all items
  • -1 indicates the direct descendents/children items of the SummaryItem ( child items of the SummaryItem )
  • -2 means leaf descendents/items of the SummaryItem, where a leaf or terminal item is an item with no child items
  • -3 means all descendents/children items of the SummaryItem ( recursively)

For instance, UndefineSummaryBars(SummaryItem,SummaryKey,-1,"<K*>") excludes the bar with the key starting with K from direct descendents of the SummaryItem 

The 0, -1, -2 and -3 values are supported, starting from the version 12.0

KeyRemove as Variant A VARIANT expression that indicates the key of the bar being removed from the summary bar. The KeyRemove parameter supports pattern if specified such as "<pattern>", where the pattern may contain wild card characters such as '?' for any single character, '*' for zero or more occurrences of any character, '#' for any digit character. For instance, UndefineSummaryBars(,,,"<K*>") excludes the bars with the key that starts with K, from the SummaryItem/SummaryKey bar

The "<pattern>" syntax is supported, starting from the version 12.0

The UndefineSummaryBars method does the reverse operation of the DefineSummaryBars, as it removes a bar from a summary bar. The DefineSummaryBars method defines bars being displayed under a summary bar. Once a bar that's included in a summary bar is moved or resized, its summary bar is automatically updated. Once a summary bar is moved all included bars are moved too. For instance, if your chart displays a "Summary" or "Project Summary" predefined bar, you can use the DefineSummaryBars method to define the bars included in the summary bar, so they automatically update the summary bars when moving or resizing. The DefineSummaryBars method defines a group of bars that belongs to another bar ( called summary bar ), so the margins of the summary bars are min and max of the margins of included bars. The margins of the bars are determined by ItemBar(exBarStart) and ItemBar(exBarEnd).