property Bar.Height as Long
Retrieves or sets a value that indicates the height in pixels of the bar.

TypeDescription
Long A Long expression that indicates the height of the bar, in pixels.
Use the Height property to change the heights for your bars. If the Height property is 0, the bar is not displayed. If the Height property is negative, the height of the bar is specified by the height of the item that displays the bar. If the Height property is positive it indicates the height of the bar to be displayed, in pixels. Use the DefaultItemHeight property to specify the default height for all items in the control. Use the ItemHeight property to specify the height for a specified item. The CellSingleLine property specifies whether a cell displays its caption using multiple lines. If you require a single bar with a different height, you can use the Copy method to copy a new bar, and use the Height property to specify a different height.

The control provides several predefined bars as follows:

For instance, the following VB sample changes the height of the "Task" bar:

G2antt1.Chart.Bars("Task").Height = 18

The following VC++ sample changes the height of the "Task" bar:

m_g2antt.GetChart().GetBars().GetItem( COleVariant( "Task" ) ).SetHeight( 18 );

The following VFP sample changes the height of the "Task" bar:

With thisform.G2antt1.Chart.Bars
	.Item("Task").Height = 18
endwith

The following C# sample changes the height of the "Task" bar:

axG2antt1.Chart.Bars["Task"].Height = 18;

The following VB.NET sample changes the height of the "Task" bar:

AxG2antt1.Chart.Bars("Task").Height = 18