The
ItemBarPropertyEnum type supports the following values:
![]() | Name | Value | Description | ||
| exBarName | 0 | Retrieves or sets a value that indicates the name of the bar. The name of the bar does not indicate the bar's caption as exBarCaption property. Use the exBarName property to specify the type of the bar being shown. The BarName parameter of the AddBar method indicates the name of the bar being added. Use the Add method to add new type of bars to your chart. (String expression) | |||
| exBarStart | 1 | Retrieves or sets a value that indicates the start of the bar. The DateStart parameter of the AddBar method indicates the start of the bar being added. Use the exBarStart property to changes the starting point of the bar. DATE expression, including a String expression that defines the date. Use the ShowEmptyBars property to show the bars, even if the start and end dates are identical. Use the exBarMove or exBarDuration to move or resize programmatically the bar. Use the exBarStartPrev property to get the starting date before resizing the bar. If you need to change both start and end points of the bar in the same time, you can call the AddBar method with the new coordinates, same item and key. (Date expression) | |||
| exBarEnd | 2 | Retrieves or sets a value that indicates the end of the bar. The DateEnd parameter of the AddBar method indicates the end of the bar being added. Use the exBarStart property to changes the ending point of the bar. DATE expression, including a String expression that defines the date. Use the ShowEmptyBars property to show the bars, even if the start and end dates are identical. Use the exBarMove or exBarDuration to move or resize programmatically the bar. Use the exBarEndPrev property to get the ending date before resizing the bar. If you need to change both start and end points of the bar in the same time, you can call the AddBar method with the new coordinates, same item and key. (Date expression) | |||
| exBarCaption | 3 | Retrieves or sets a value that indicates the caption being assigned to the bar. The Text parameter of the AddBar method indicates the caption of the bar. Use the exBarHAlignCaption and exBarVAlignCaption to specify the alignment of the bar's caption. This option supports built-in HTMLformat. Use the exBarExtraCaption option to specify additional labels or captions for the bar. Use the Add method to associate a note with a bar. (String expression) | |||
| exBarHAlignCaption | 4 |
Retrieves or sets a value that indicates the horizontal alignment of the caption inside the bar.
Use the
exBarHAlignCaption property to align horizontally the caption being displayed
between exBarStart and exBarEnd.
By default, the exBarHAlignCaption is CenterAlignment. (AlignmentEnum expression) | |||
| exBarVAlignCaption | 5 | Retrieves or sets a value that indicates the vertical alignment of the caption inside the bar. Use the exBarHAlignCaption property to align vertically the caption being displayed between exBarStart and exBarEnd. If the exBarVAlignCaption property includes the VAlignmentEnum.exVOutside the caption is displayed outside of the bar at the top or bottom side of the bar. For instance, if the exBarVAlignCaption property is VAlignmentEnum.exTop OR VAlignmentEnum.exVOutside, the caption is displayed outside of the bar in the top side of the bar. If the exBarVAlignCaption property is VAlignmentEnum.exBottom OR VAlignmentEnum.exVOutside, the caption is displayed outside of the bar in the bottom side of the bar. By default, the exBarVAlignCaption is exMiddle. (VAlignmentEnum expression) | |||
| exBarToolTip | 6 | Retrieves or sets a value that indicates the tooltip being shown when the cursor hovers the bar. The property supports built-in HTML format. Use the exBarToolTip property to assign a tooltip to a bar or to a text in the chart's area. Use the ShowToolTip method to show a tooltip at runtime for different parts of the chart. (String expression) | |||
| exBarBackColor | 7 | Retrieves or sets a value that indicates the background color for the area being occupied by the bar. Color expression. This option has effect only if the exBarBackColor property is not zero. The last 7 bits in the high significant byte of the color indicates the identifier of the skin being used. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the background's part. The exSummaryBarBackColor property specifies the background color for the portion occupied by the bar while it is hosted by a summary bar, while the exBarColor property specifies the bar's color. (Color expression) | |||
| exBarForeColor | 8 | Retrieves or sets a value that indicates the foreground color for the caption of the bar. Color expression. This option has effect only if the exBarBackColor property is not zero. (Color expression) | |||
| exBarKey | 9 | Specifies key of the bar. The Key parameter of the AddBar method indicates the key of the bar. (Variant expression ) | |||
| exBarCanResize | 10 | Specifies whether the user can resize the bar. Use the BarsAllowSizing property to specify whether the control supports moving or resizing the bars. If the exBarCanResize is 0/False, the bar can not be resized. If the exBarCanResize is -1/True, the bar can be resized on both sides. If the exBarCanResize is 1, the bar can be resized on left side, and can not be resized on right. If the exBarCanResize is 2, the bar can be resized on right side, and can not be resized on left. The exBarSelectable specifies whether a bar is fixed to its position, in other words if it can be selected or not. ( Boolean/Long expression ) | |||
| exBarCanMove | 11 | Specifies whether the user can move the bar. Use the BarsAllowSizing property to specify whether the control supports moving or resizing the bars. Use the exBarCanMoveToAnother option to specify whether the user can move a bar from one item to another by drag and drop. The exBarSelectable specifies whether the bar can be selected at runtime. ( Boolean expression ) | |||
| exBarPercent | 12 |
| |||
| exBarPercentCaptionFormat | 13 | Specifies the HTML format to be displayed as percent. The percent is displayed on the bar only if the exBarShowPercentCaption option is True. By default, the exBarPercentCaptionFormat property is "<b>%p%</b>" where the %p is the value of the percent ( exBarPercent property ), and it displays the percent as 15%, where exBarPercent is 0.15. The <b> indicates that the text is bolded. (String expression) | |||
| exBarShowPercentCaption | 14 | Specifies whether the percent is displayed as caption on the bar. By default, the exBarShowPercentCaption property is False, which means that the percent value is not shown. Use the exBarPercent property to specify the value of the percent. Use the exBarPercentCaptionFormat property to define the format of the percent being displayed on the bar. Use the exBarAlignPercentCaption property to indicates the alignment of the percent in the bar. (Boolean expression) | |||
| exBarAlignPercentCaption | 15 | Specifies the alignment of the percent caption on the bar. By default, the exBarAlignmentPercentCaption property is RightAlignment, that indicates that the percent value is displayed to the right. (AlignmentEnum expression) | |||
| exBarCanResizePercent | 16 | Specifies whether the user can resize the percent at runtime. By default, the exBarCanResizePercent is True. Here's how the user can resize the percent value at runtime. Move the mouse to the last portion of the percent, so the Percent cursor is shown. Click and drag the bar to a new position, so the exBarPercent value is defined proportionally by the position of the cursor in the original bar. The BarResize event is fired when the user changes the percent value at runtime. (Boolean expression) | |||
| exBarData | 17 | Associates an extra data to a bar. Use this property to assign your extra data to any bar in the item. (Variant expression) | |||
| exBarOffset | 18 |
| |||
| exBarTransparent | 19 |
| |||
| exBarKeepWorkingCount | 20 | Specifies a value that indicates whether the bar keeps constant the working units, while the user moves the bar to a new position. The NonworkingDays property specifies the non-working days. Use the AddNonworkingDate property to add custom non-working days. Use the NonworkingHours property to specify the non-working hours. The exBarWorkingCount option specifies the number of working units being unchanged. This option is ignored for summary bars or exBarTreatAsNonworking bars. (Boolean expression) | |||
| exBarEffort | 21 |
(exBarEffort/21) By default,
the exBarEffort is 1 ( double expression ). Specifies the effort to execute an unit in the task.
This property has effect only when the bar is represented in the chart's
histogram. Use the HistogramVisible
property to specify whether the control shows the chart's histogram. Changes the HistogramPattern
or/and HistogramColor property,
else no bars will be shown in the histogram.
The representation of the exBarEffort value depends on the HistogramType property as follow:
The following screen shot shows the exHistOverload histogram when exBarEffort property is 1 ( by default ): The following screen shot shows the exHistOverload histogram when exBarEffort property is different for bars as seen in the columns section:
The following screen shot shows the exHistOverallocation histogram when exBarEffort property is 1 ( by default ): The following screen shot shows the exHistOverallocation histogram when exBarEffort property is different for bars as seen in the columns section:
(Float expression) | |||
| exBarMinStart | 22 | Specifies the minimum value for the starting date of the bar. Use this value to limit bar to move in a specified range. Use the exBarMinDuration and exBarMaxDuration properties to specify the limits for the bar's duration. ( Date expression ) | |||
| exBarMaxStart | 23 | Specifies the maximum value for the starting date of the bar. Use this value to limit bar to move in a specified range. Use the exBarMinDuration and exBarMaxDuration properties to specify the limits for the bar's duration. ( Date expression ) | |||
| exBarMinEnd | 24 | Specifies the minimum value for the ending date of the bar. Use this value to limit bar to move in a specified range. Use the exBarMinDuration and exBarMaxDuration properties to specify the limits for the bar's duration. ( Date expression ) | |||
| exBarMaxEnd | 25 | Specifies the maximum value for the ending date of the bar. Use this value to limit bar to move in a specified range. Use the exBarMinDuration and exBarMaxDuration properties to specify the limits for the bar's duration. ( Date expression ) | |||
| exBarShowRange | 26 | Indicates whether the bar shows its range where it can be moved or resized. It indicates a PatternEnum expression that specifies the way to mark the range of the bar, or a skin identifier to be used for showing the range. (Boolean expression) | |||
| exBarShowRangeTransparent | 27 | Specifies the percent of the transparency to display the range of the bar. By default this property is 0. ( Long expression, from 0 to 100, where 100 means fully transparent ) | |||
| exBarCanMoveToAnother | 28 | By default, the bar can NOT be moved from an item to another. Specifies whether the bar can be moved to another item by drag and drop. Use the exBarPercent property to change the parent item of the bar by code. In order to move a bar from one item to another using the drag and drop operations, this option MUST be set on True. 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. (Boolean expression) | |||
| exBarSelectable | 29 | Specifies whether the bar can be selected. The exBarCanMove specifies whether a bar can be moved at runtime. The exBarCanResize specifies whether a bar can be resized at runtime. The exBarSelectable specifies whether a bar is fixed to its position. ( Boolean expression ) | |||
| exBarCanStartLink | 30 | Specifies whether a link can start from this bar. By default, the exBarCanStartLink is True. The exBarCanStartLink option has effect only if the exBarCanBeLinked option is True. You can control enabling or disabling links at runtime using the AllowLink event. ( Boolean expression ) | |||
| exBarCanEndLink | 31 | Specifies whether a link can end on this bar. . By default, the exBarCanEndLink is True. The exBarCanEndLink option has effect only if the exBarCanBeLinked option is True. You can control enabling or disabling links at runtime using the AllowLink event. ( Boolean expression ) | |||
| exBarCanBeLinked | 32 | Specifies whether the bar can be linked. . By default, the exBarCanBeLinked is True. You can control enabling or disabling links at runtime using the AllowLink event. ( Boolean expression ) | |||
| exBarColor | 33 | Specifies the color for a particular bar. If used, it replaces the bar's type color. By default, the exBarColor is 0, which means that the default bar's color is used. The Color property defines the default's bar color. The Color property defines the color for all bars of the same type. Use the exBarColor to change the color for particular bars. As usual, this option may indicates a skin object to display the bar. If the EBN identifier (last 7 bits in the high significant byte of the color) is not specified(0), but the Color property indicates an EBN object, the exBarColor specifies the color to apply to the EBN object. The exBarOverviewColor option may be used to specify the color within the overview part of the control. The HistogramCumulativeOriginalColorBars property indicates whether the bars that generate the histogram change their original color. If available, you can change the bar's pattern using the exBarPattern option. ( Color expression ). | |||
| exSummaryBarBackColor | 34 |
Specifies the item's background color for child bars owned by the summary bar. The last 7 bits in the high significant byte of the color indicates
the identifier of the skin being used. Use the Add
method to add new skins to the control. If you need to remove the skin
appearance from a part of the control you need to reset the last 7 bits in the
high significant byte of the color being applied to the background's part. The DefineSummaryBars
property defines bars that belongs to a summary bar.
By default, the exSummaryBarBackColor property is 0, which means that it has no effect. If the exSummaryBarBackColor property is set to a non- zero value it indicates the background color for the portion of the summary bar as seen in the following screen shot:
The following screen shot shows the bars that belongs to a summary bars using EBN colors and semi-transparent (exSummaryBarBackColorTransparent = 50):
The exBarBackColor property specifies the background color for the portion occupied by the bar, while the exBarColor property specifies the bar's color. (Color expression) | |||
| exSummaryBarBackColorTransparent | 35 |
Specifies the percent of the transparency to display the background of the bars that belongs to a summary bar.
By default, the
exSummaryBarBackColorTransparent property is 0, which means opaque since 100
means fully transparent, and 50 means semi-transparent. The
exSummaryBarBackColorTransparent property has effect only if the
exSummaryBarBackColor property is not 0.
The following screen shot displays the bars that belongs to a summary bar using a semi-transparent color ( so the non-working portion is visible )
(Long expression between 0-opaque, 100-transparent) | |||
| exBarMinDuration | 36 | Specifies the minimum duration of the bar in days . By default, the exBarMinDuration property is 0, which means that there is no lower limit, or the length of the bar can be any value. If the exBarMinDuration property is not 0, the duration of the bar must be greater than specified value, or in other words, the bar will not be shown with its duration less than exBarMinDuration value. Use the exBarDuration property to change the bar's duration. (double expression) | |||
| exBarMaxDuration | 37 | Specifies the maximum duration of the bar in days. By default, the exBarMaxDuration property is -1, which means that there is no upper limit, or the length of the bar can be any value. If the exBarMaxDuration property is not -1, the duration of the bar must be less than specified value, or in other words, the bar will not be shown with its duration greater than exBarMaxDuration value. Use the exBarDuration property to change the bar's duration. (double expression) | |||
| exBarTreatAsNonworking | 38 |
Specifies whether the bar is treated as non-working part of the item. By
default, the
exBarTreatAsNonworking is False.
This option has effect only if:
In other words, the exBarTreatAsNonworking bars are treated as regular bars if the AllowNonworkingBars property is False, or if ItemNonworkingUnits property is empty (boolean expression). | |||
| exBarPercentColor | 39 | Specifies the color to show inside percent bar. The option is valid for bars that displays inside a percent bar. A bar can display a percent bar if it was creates using the Chart.Bars.Add("A%B") syntax. For instance Chart.Bars.Add("Task%Progress") adds a task bar that displays inside a percent bar. (Color expression) | |||
| exBarNonWorkingColor | 40 | Specifies the color to show non-working parts of the bar. A bar may show different shape, pattern for non-working parts of the bar if it was previously created using the Bars.Add("A:B"). For instance the Bars.Add("Task:Split") adds a a bar that displays the split if it covers a non-working part. (Color expression) | |||
| exBarOverviewColor | 41 |
Specifies the color to show the bar in the overview area. The OverviewVisible
property specifies whether the control displays the overview/layout map of bars
within the chart.
The color to specify the bar in the overview area is used as follows:
(Color expression) | |||
| exBarPattern | 42 | By default the exBarPattern option is empty. If the exBarPattern property is empty, the option is ignored. Use the exBarPattern to specify a different pattern to be displayed on the bar in the chart area. The Pattern property of the Bar specifies the pattern to be applied for all bars of the same type. For instance, includes the exPatternFrameShadow in the bar's pattern to show a shadow around the bar. (PatternEnum expression) | |||
| exBarsCount | 256 | Retrieves a value that indicates the number of bars in the item. The exBarsCount property counts the bars being displayed in the item. Use the AddBar property to add new bars to the item. (Long expression) | |||
| exBarSelected | 257 | Specifies whether the bar is selected or unselected. By default, the exBarSelected is False. The AllowSelectObjects property allows users to select at runtime the bars and links in the chart area. The ChartSelectionChanged event is fired when the selection in the chart is changed. (Boolean expression) | |||
| exBarWorkingCount | 258 | Specifies the count of working units ( days ) in the bar. For instance, 1 indicates one working day, while 0.5 indicates 12 hours from a working day. The NonworkingDays property specifies the non-working days. Use the AddNonworkingDate property to add custom non-working days. Use the NonworkingHours property to specify the non-working hours. Use the exBarWorkingCount property to specify the number of working days for a specified bar. For instance, if your chart displays days, and the NonworkingDays is set, the exBarWorkingCount property sets or gets the count of working days in the bar. If the chart displays hours, and the NonworkingHours property is set, the exBarWorkingCount property sets or gets the count of working hours in the bar. (Float expression) | |||
| exBarNonWorkingCount | 259 | Specifies the count of non-working units ( days ) in the bar. For instance, 1 indicates one non-working day, while 0.5 indicates 12 hours from a non-working day. The NonworkingDays property specifies the non-working days. Use the AddNonworkingDate property to add custom non-working days. Use the NonworkingHours property to specify the non-working hours. For instance, if your chart displays days, and the NonworkingDays is set, the exBarNonworkingCount property gets the count of non-working days in the bar. If the chart displays hours, and the NonworkingHours property is set, the exBarNonWorkingCount property gets the count of non-working hours in the bar. (double expression) | |||
| exBarNonWorkingUnits | 260 |
Retrieves a collection of pairs ( start-end ) that indicates the non-working parts of the bar.
You can use the
exBarNonWorkingUnitsAsString property to get the non-working parts of the bar as
a string. The /NET Assembly provides a get_BarNonWorkingUnits
method that retrieves a collection of DateTime objects.
The following VB sample lists the start and end date-time values for non-working parts of the bar ( for the /COM version ): Private Sub G2antt1_BarResize(ByVal item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant)
Debug.Print "Non-working parts of the bar:"
With G2antt1.Items
Dim i As Variant, j As Long
For Each i In .ItemBar(item, Key, exBarNonWorkingUnits)
Debug.Print IIf(j Mod 2 = 0, "Start ", "End ") & i
j = j + 1
Next
End With
End Sub
The following VB/NET sample lists the start and end date-time values for non-working parts of the bar ( for the /NET Assembly version ): Private Sub Exg2antt1_BarResize(ByVal sender As System.Object, ByVal Item As System.Int32, ByVal Key As System.Object) Handles Exg2antt1.BarResize
Debug.Print("Non-working parts of the bar:")
With Exg2antt1.Items
Dim i As Object, j As Long
For Each i In .get_BarNonWorkingUnits(Item, Key)
Debug.Print(IIf(j Mod 2 = 0, "Start ", "End ") & i)
j = j + 1
Next
End With
End Sub
( safe array of pairs of dates indicating the start and end of the non-working area ) | |||
| exBarNonWorkingUnitsAsString | 261 |
Displays as string the collection of pairs ( start-end ) that indicates the non-working parts of the bar.
The /NET Assembly provides a get_BarNonWorkingUnitsAsString
method that retrieves the non-working parts of the bar as string
The following VB sample lists the start and end date-time values for non-working parts of the bar ( for the /COM version ): Private Sub G2antt1_BarResize(ByVal item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant)
Debug.Print "Non-working parts of the bar:"
With G2antt1.Items
Debug.Print .ItemBar(item, Key, exBarNonWorkingUnitsAsString)
End With
End Sub
The following VB/NET sample lists the start and end date-time values for non-working parts of the bar ( for the /NET Assembly version ): Private Sub Exg2antt1_BarResize(ByVal sender As System.Object, ByVal Item As System.Int32, ByVal Key As System.Object) Handles Exg2antt1.BarResize
Debug.Print("Non-working parts of the bar:")
With Exg2antt1.Items
Debug.Print(.get_BarNonWorkingUnitsAsString(Item, Key))
End With
End Sub
(String expression) | |||
| exBarWorkingUnits | 262 |
Retrieves a collection of pairs ( start-end ) that indicates the working parts of the bar.
You can use the exBarWorkingUnitsAsString property to get the working parts of
the bar as a string. The /NET Assembly provides a get_BarWorkingUnits
method that retrieves a collection of DateTime objects.
The following VB sample lists the start and end date-time values for working parts of the bar ( for the /COM version ): Private Sub G2antt1_BarResize(ByVal item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant)
Debug.Print "Working parts of the bar:"
With G2antt1.Items
Dim i As Variant, j As Long
For Each i In .ItemBar(item, Key, exBarWorkingUnits)
Debug.Print IIf(j Mod 2 = 0, "Start ", "End ") & i
j = j + 1
Next
End With
End Sub
The following VB/NET sample lists the start and end date-time values for working parts of the bar ( for the /NET Assembly version ): Private Sub Exg2antt1_BarResize(ByVal sender As System.Object, ByVal Item As System.Int32, ByVal Key As System.Object) Handles Exg2antt1.BarResize
Debug.Print("Working parts of the bar:")
With Exg2antt1.Items
Dim i As Object, j As Long
For Each i In .get_BarWorkingUnits(Item, Key)
Debug.Print(IIf(j Mod 2 = 0, "Start ", "End ") & i)
j = j + 1
Next
End With
End Sub
( safe array of pairs of dates indicating the start and end of the working area ) | |||
| exBarWorkingUnitsAsString | 263 |
Displays as string the collection of pairs ( start-end ) that indicates the working parts of the bar.
The /NET Assembly provides a get_BarWorkingUnitsAsString method
that retrieves the working parts of the bar as string.
The following VB sample lists the start and end date-time values for working parts of the bar ( for the /COM version ): Private Sub G2antt1_BarResize(ByVal item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant)
Debug.Print "Working parts of the bar:"
With G2antt1.Items
Debug.Print .ItemBar(item, Key, exBarWorkingUnitsAsString)
End With
End Sub
The following VB/NET sample lists the start and end date-time values for working parts of the bar ( for the /NET Assembly version ): Private Sub Exg2antt1_BarResize(ByVal sender As System.Object, ByVal Item As System.Int32, ByVal Key As System.Object) Handles Exg2antt1.BarResize
Debug.Print("Working parts of the bar:")
With Exg2antt1.Items
Debug.Print(.get_BarWorkingUnitsAsString(Item, Key))
End With
End Sub
(String expression) | |||
| exBarExtraCaption | 264 |
Use the exBarExtraCaption property to assign multiple captions to a bar at once. Retrieves or sets a collection of extra captions being assigned to the bar.
If a single extra caption is being added, you can use the caption, or if
multiple you have to build a safe array of strings. By default, any extra
caption is added to the center of the bar. Use the
exBarExtraCaptionHAlign to specify the horizontal alignment of the extra caption
being added. Use the exBarExtraCaptionHOffset to specify the horizontal offset
to move the extra caption relative to its default position. Use the
exBarExtraCaptionVAlign to specify the vertical alignment of the extra caption
being added. Use the exBarExtraCaptionVOffset to specify the vertical offset to
move the extra caption relative to its default position. The /NET assembly
provides, the get_BarExtraCaption and set_BarExtraCaption
properties to get and set the extra captions. Use the Add
method to associate a note with a bar.
The following VB sample adds a single extra caption in the right side of the bar: With G2antt1.Items
.ItemBar(.FocusItem, .FirstItemBar(.FocusItem), exBarExtraCaption) = "right"
.ItemBar(.FocusItem, .FirstItemBar(.FocusItem), exBarExtraCaptionHAlign) = RightAlignment Or exHOutside
End With
The following VB sample adds two extra captions, one in the left side, and one to the right side: With G2antt1.Items
.ItemBar(.FocusItem, .FirstItemBar(.FocusItem), exBarExtraCaption) = Array("left", "right")
.ItemBar(.FocusItem, .FirstItemBar(.FocusItem), exBarExtraCaptionHAlign) = Array(LeftAlignment Or exHOutside, RightAlignment Or exHOutside)
End With
When retrieving the exBarExtraCaption returns the extra caption, if there is only, one, else it returns a safe arrea ( collection ) of string that indicates the extra captions of the bar. The following VB/NET sample adds a single extra caption in the right side of the bar: With Exg2antt1.Items
.set_BarExtraCaption(.FocusItem, .get_FirstItemBar(.FocusItem), "right")
.set_BarExtraCaptionHAlign(.FocusItem, .get_FirstItemBar(.FocusItem), exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment Or exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside)
End With
The following VB/NET sample adds two extra captions, one in the left side, and one to the right side: With Exg2antt1.Items
.set_BarExtraCaption(.FocusItem, .get_FirstItemBar(.FocusItem), New String() {"left", "right"})
.set_BarExtraCaptionHAlign(.FocusItem, .get_FirstItemBar(.FocusItem), _
New exontrol.EXG2ANTTLib.AlignmentEnum() {exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment Or exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside, _
exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment Or exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside})
End With
The following C# sample adds a single extra caption in the right side of the bar: exontrol.EXG2ANTTLib.Items items = exg2antt1.Items; items.set_BarExtraCaption(items.FocusItem, items.get_FirstItemBar(items.FocusItem), "right"); items.set_BarExtraCaptionHAlign(items.FocusItem, items.get_FirstItemBar(items.FocusItem), exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment | exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside); The following C# sample adds two extra captions, one in the left side, and one to the right side: exontrol.EXG2ANTTLib.Items items = exg2antt1.Items;
items.set_BarExtraCaption(items.FocusItem, items.get_FirstItemBar(items.FocusItem),
new string[2] { "left", "right" });
items.set_BarExtraCaptionHAlign(items.FocusItem, items.get_FirstItemBar(items.FocusItem),
new exontrol.EXG2ANTTLib.AlignmentEnum[2] { exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment | exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside,
exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment | exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside });
( string expression or safe array of string expressions ) | |||
| exBarExtraCaptionHAlign | 265 | Specifies the horizontal alignment for each extra caption assigned to the bar. ( AlignmentEnum expression, or a safe array of AlignmentEnum/long/vt_i4 expression) | |||
| exBarExtraCaptionVAlign | 266 | Specifies the vertical alignment for each extra caption assigned to the bar. ( VAlignmentEnum expression, or a safe array of VAlignmentEnum/long/vt_i4 expression) | |||
| exBarExtraCaptionHOffset | 267 | Retrieves or sets the offset to move horizontally the extra caption relative to its default position. ( long expression, or a safe array of long/vt_i4 expression) | |||
| exBarExtraCaptionVOffset | 268 | Retrieves or sets the offset to move vertically the extra caption relative to its default position. ( long expression, or a safe array of long/vt_i4 expression) | |||
| exBarParent | 512 | Specifies the handle of the parent item that displays the bar. The Item parameter of the AddBar method indicates the handle of the item that hosts the bar. Use the exBarCanMoveToAnother option to specify whether the user can move a bar from one item to another by drag and drop. 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. (Long expression) | |||
| exBarDuration | 513 | Specifies the duration of the bar in days. Gets the difference between exBarEnd and exBarStart as a double expression. If calling the set property, it changes the bar's duration. If negative the start date is baed on the end - duration, since if it is positive, the end date is start + duration. The round part indicates the number of days. Use the exBarMove property to move programmatically a bar by specified time. If you need to change both start and end points of the bar in the same time, you can call the AddBar method with the new coordinates, same item and key. Use the exBarDurationPrev property to get the length or duration of the bar before resizing it. Use the exBarMinDuration and exBarMaxDuration properties to specify the limits for the bar's duration. ( Float expression ) | |||
| exBarMove | 514 | Moves the bar inside the same item by specified amount of time. If you need to change both start and end points of the bar in the same time, you can call the AddBar method with the new coordinates, same item and key. The exBarParent changes the bar's parent. Use the exBarCanMoveToAnother option to specify whether the user can move a bar from one item to another by drag and drop. ( Float expression ) | |||
| exBarStartPrev | 515 | Retrieves the starting date of the bar before changing it ie if the user moves or resizes the bar at runtime, the exBarStartPrev gives during the BarResize event the previously starting date of the bar. (Date expression) | |||
| exBarEndPrev | 516 | Retrieves the ending date of the bar before changing it ie if the user moves or resizes the bar at runtime, the exBarEndPrev gives during the BarResize event the previously starting date of the bar. (Date expression) | |||
| exBarDurationPrev | 517 | Retrieves the duration or length of the bar before resizing it. During the BarResize event the exBarDurationPrev gives the length or duration of the bar before resizing it. You can distingue moving or resizing a specified bar by comparing the exBarDuration and exBarDurationPrev values. (Float expression) | |||
| exBarPercent100 | 518 |
| |||
| exBarIntersectWith | 519 | Gets a collection of bars that intersect with the current bar. Use the exBarIntersectWithCount property to retrieve only the count of intersected bars. The result of exBarIntersectWith property is a collection of VARIANT values that indicates the keys of the bar in the current item that intersects with the current bar. The /NET or /WPF version provides a template function as public virtual List<object> get_BarIntersectWith(int Item, object Key) that returns a list of keys. The IntersectBars property specifies whether two bars intersect if returns 0, if 1 A is before B and -1 if A is after bar B. (safe array of variant expression) | |||
| exBarIntersectWithAsString | 520 | Gets a collection of bars that intersect with the current bar as string. The list is separated by comma character. (string expression) | |||
| exBarIntersectWithCount | 521 | Specifies the number of bars that intersects with the current bar. The IntersectBars property specifies whether two bars intersect if returns 0, if 1 A is before B and -1 if A is after bar B. (long expression) | |||
| exBarsGroup | 522 |
Retrieves a collection of bars being grouped with current bar.
The result of exBarsGroup property is a collection of VARIANT values
that indicates the handle of the item and the key of the bars being grouped
with specified bar. The GroupBars method group
two bars, while the Use the UngroupBars
method to ungroup two bars or all bars. The /NET or /WPF version provides a template function as
public virtual
List<SelectedBar>
get_BarsGroup(int Item, object
Key) that returns a list of bars. The SelectedBar
structure provides two
members the Item and the Key, where the Item indicates the handle of the item
that hosts the bar, while the Key indicates the key of the bar.
The following VB/NET sample displays the bars being grouped with selected bar(s): With Exg2antt1.Items
Dim sSelected As List(Of exontrol.EXG2ANTTLib.Items.SelectedBar) = .get_SelectedBars()
If Not sSelected Is Nothing Then
Dim s As exontrol.EXG2ANTTLib.Items.SelectedBar
For Each s In sSelected
Debug.Print(s.Key & " from " & .get_CellCaption(s.Item, 0))
Dim sGrouped As List(Of exontrol.EXG2ANTTLib.Items.SelectedBar) = .get_BarsGroup(s.Item, s.Key)
If Not sGrouped Is Nothing Then
Dim b As exontrol.EXG2ANTTLib.Items.SelectedBar
For Each b In sGrouped
Debug.Print(vbTab & b.Key & " from " & .get_CellCaption(b.Item, 0))
Next
End If
Next
End If
End With
|