property Bar.Pattern as PatternEnum
Retrieves or sets a value that indicates the pattern being used to fill the bar.

TypeDescription
PatternEnum A PatternEnum expression that indicates the brush being used to fill the bar.
Use the Pattern property to specify the brush to fill the bar. By default, the Pattern property is exPatternSolid. Use the Color property to specify the color to fill the bar. Use the Shape property to specify the height and the vertical alignment of the middle part of 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. If the Pattern property is exPatternBox, the StartColor and EndColor properties defines the start and ending color to show a gradient bar. If available, the ItemBar(exBarPattern) property may be used to specify a different pattern for a specified bar only.

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

With G2antt1.Chart.Bars
    With .Copy("Task", "Task2")
        .Pattern = exPatternDot
    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 pattern to fill the bar:

CBars bars = m_g2antt.GetChart().GetBars();
CBar bar = bars.Copy( "Task", "Task2" );
bar.SetPattern( 2 /*exPatternDot*/ );

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

With AxG2antt1.Chart.Bars
    With .Copy("Task", "Task2")
        .Pattern = EXG2ANTTLib.PatternEnum.exPatternDot
    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 pattern to fill the bar:

EXG2ANTTLib.Bar bar = axG2antt1.Chart.Bars.Copy("Task", "Task2");
bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternDot;

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

with thisform.G2antt1.Chart.Bars
	with .Copy("Task", "Task2" )
		.Pattern = 2
	endwith
endwith