property Bar.Shape as ShapeBarEnum
Retrieves or sets a value that indicates the shape of the bar.

TypeDescription
ShapeBarEnum A ShapeBarEnum expression that indicates the height and the vertical alignment of the bar
Use the Shape property to specify the height and the vertical alignment of the middle part of the bar. By default, the Shape property is exShapeSolid. Use the Pattern property to specify the brush to fill the bar. Use the Color property to specify the color to fill the bar. Use the StartColor property to specify the color for the beginning part of the bar, if the StartShape property is not exShapeIconEmpty. Use the EndColor property to specify the color for the ending part of the bar, if the EndShape property is not exShapeIconEmpty.

The following VB sample creates a new bar called "Task2", that's similar with the "Task" bar excepts that we change the shape of the new bar bar:

With G2antt1.Chart.Bars
    With .Copy("Task", "Task2")
        .Shape = exShapeSolidCenter
    End With
End With

The following C++ sample creates a new bar called "Task2", that's similar with the "Task" bar excepts that we change the shape of the new bar bar:

CBars bars = m_g2antt.GetChart().GetBars();
CBar bar = bars.Copy( "Task", "Task2" );
bar.SetShape( 3 /*exShapeSolidCenter*/ );

The following VB.NET sample creates a new bar called "Task2", that's similar with the "Task" bar excepts that we change the shape of the new bar bar:

With AxG2antt1.Chart.Bars
    With .Copy("Task", "Task2")
        .Shape = EXG2ANTTLib.ShapeBarEnum.exShapeSolidCenter
    End With
End With

The following C# sample creates a new bar called "Task2", that's similar with the "Task" bar excepts that we change the shape of the new bar bar:

EXG2ANTTLib.Bar bar = axG2antt1.Chart.Bars.Copy("Task", "Task2");
bar.Shape = EXG2ANTTLib.ShapeBarEnum.exShapeSolidCenter;

The following VFP sample creates a new bar called "Task2", that's similar with the "Task" bar excepts that we change the shape of the new bar bar:

with thisform.G2antt1.Chart.Bars
	with .Copy("Task", "Task2" )
		.Shape = 3
	endwith
endwith