method Items.GroupBars (ItemA as HITEM, KeyA as Variant, StartA as Boolean, ItemB as HITEM, KeyB as Variant, StartB as Boolean)
Groups two bars.

 TypeDescription 
   ItemA as HITEM A long expression that indicates the handle of the item that contains the bar to group to.  
   KeyA as Variant A long or string expression that specifies the key of the bar to group to. The Key parameter of the  AddBar method specifies the key of the bar being added.   
   StartA as Boolean A boolean expression that specifies whether the start or the end of the bar is grouped with other bar. True specifies that the start of the bar is grouped with other bar. False indicates that the end of the bar is grouped with other bar.  
   ItemB as HITEM A long expression that indicates the handle of the item that contains the bar being grouped with.  
   KeyB as Variant A long or string expression that specifies the key of the bar being grouped with.  
   StartB as Boolean A boolean expression that specifies whether the start or the end of the bar is grouped with other bar. True specifies that the start of the bar is grouped with other bar. False indicates that the end of the bar is grouped with other bar.  
The GroupBars method groups two bars. For instance, if two bars or more bars are grouped, when a bar in the group is resize or moved, the other bars in the group are resized or moved accordingly. In the same manner, all other groups that are related with one of the group being resized or moved, are reside or moved. You can group bars from different items. Use the UngroupBars method to ungroup two bars or all bars. When grouping, the distance between the margin of the bars being grouped is kept constant. For instance,  if we group the end of the bar a with the start of the bar b, the distance between end of the bar a and the start of the bar b is the same when moving or resizing any of the bars a or b.

Let's stay that we have the following chart:

with the keys:

By default ( no bars are grouped ), if we move the bar 2, from Oct 19, to Oct 21 , we get the following ( the bar 1, 3, and M are not moved or resized ):

If we group the bars as follows:

 , and we move the bar 2, from Oct 19, to Oct 24  we get the following:

we notice that the bar 2 and M are moved, and bar 1 is resized.

 


Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.