Type | Description | |||
Item as HITEM | A long expression that indicates the the handle of the item where the bar is removed. If the Item parameter is 0, the RemoveBar method removes all bars with specified key from all items. In this case the DefaultItem (/COM only) property should be 0 ( by default ), else it refers a single item being indicated by the DefaultItem property. | |||
Key as Variant | A String expression that indicates the key of the bar to be removed. If missing, the Key parameter is empty. The Key may include a pattern with wild characters as *,?,# or [], if the Key starts with "<" and ends on ">" aka "<K*>" which indicates all bars with the key K or starts on K. The pattern may include a space which divides multiple patterns for matching. For instance "<A* *K>" indicates all keys that start on A and all keys that end on K. |
Based on the values of Item and Key parameters the RemoveBar property remove none, one or multiple bars as follow:
The pattern may include the space character which indicates multiple patterns to be used when matching. For instance "A* *K" indicates all keys that start on A and all keys that end on K.
Here's few samples of using the RemoveBar method:
Use the AddBar method to add new bars to the item. Use the Remove method to remove a type of bar from the Bars collection. Use the Add method to add new types of bars to the Bars collection. Use the FirstVisibleDate property to specify the first visible date in the chart area. Use the Key parameter to identify a bar inside an item. Use the ItemBar property to access a bar inside the item. Use the PaneWidth property to specify the width of the chart. Use the NonworkingDays property to specify the non-working days. The RemoveBar method removes the links related to bar. Use the RemoveSelection method to remove the objects ( bars, links ) in the chart's selection. Use the ItemBar(exBarSelected) property to select or unselect programmatically a bar.
Use the ItemBar(exBarItemParent) property to move a bar from an item to another item. The ItemBar(exBarItemParent) property indicates the handle of the item that displays the bar. For instance, a bar can be moved from an item to another, only if in the second item there is no another bar with the same key ( ItemBar(exBarKey) property ), as an item can contains two bars with the same key. The control fires the BarParentChange event just before moving the bar to another item. Use this event to control the items where your bar can be moved. A bar can be moved to another item, ONLY if the second item does not contain a bar with the same key. The exBarKey property specifies the key of the bar.