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.

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 Gantt1.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_gantt.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 AxGantt1.Chart.Bars
    With .Copy("Task", "Task2")
        .Pattern = EXGANTTLib.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:

EXGANTTLib.Bar bar = axGantt1.Chart.Bars.Copy("Task", "Task2");
bar.Pattern = EXGANTTLib.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.Gantt1.Chart.Bars
	with .Copy("Task", "Task2" )
		.Pattern = 2
	endwith
endwith

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.