property Bar.EndShape as ShapeCornerEnum
Retrieves or sets a value that indicates the shape of the right side corner.

 TypeDescription 
   ShapeCornerEnum A ShapeCornerEnum expression that defines the shape of the icon being used to draw the corner.   
By default, the EndShape property is exShapeIconEmpty. If the EndShape property is exShapeIconEmpty the bas has no ending part. Use the Color property to specify the color to fill the middle part of the bar. Use the Pattern property to specify the brush being used 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 AddShapeCorner method to add a custom icon to be used as a starting or ending part of the bar. Use the Images or ReplaceIcon method to update the list of control's icons. 

The following VB sample adds a custom shape and defines a bar like this :

With Gantt1.Chart.Bars
    .AddShapeCorner 12345, 1
    With .Add("Task2")
        .Pattern = exPatternDot
        .Shape = exShapeThinDown
        .EndShape = 12345
        .EndColor = RGB(255, 0, 0)
        .Color = .EndColor
    End With
End With

The following C++ sample adds a custom shape and defines a bar like above:

CBars bars = m_gantt.GetChart().GetBars();
bars.AddShapeCorner( COleVariant( (long)12345 ), COleVariant( (long)1 ) );
CBar bar = bars.Add("Task2");
bar.SetPattern( 2 /*exPatternDot*/ );
bar.SetShape( 20 /*exShapeThinDown*/ );
bar.SetEndShape( 12345 );
bar.SetEndColor( RGB(255, 0, 0) );
bar.SetColor( bar.GetEndColor() );

The following VB.NET sample adds a custom shape and defines a bar like above:

With AxGantt1.Chart.Bars
    .AddShapeCorner(12345, 1)
    With .Add("Task2")
        .Pattern = EXGANTTLib.PatternEnum.exPatternDot
        .Shape = EXGANTTLib.ShapeBarEnum.exShapeThinDown
        .EndShape = 12345
        .EndColor = RGB(255, 0, 0)
        .Color = .EndColor
    End With
End With

The following C# sample adds a custom shape and defines a bar like above:

axGantt1.Chart.Bars.AddShapeCorner(12345, 1);
EXGANTTLib.Bar bar = axGantt1.Chart.Bars.Add("Task2");
bar.Pattern = EXGANTTLib.PatternEnum.exPatternDot;
bar.Shape = EXGANTTLib.ShapeBarEnum.exShapeThinDown;
bar.EndShape = (EXGANTTLib.ShapeCornerEnum)12345;
bar.EndColor = ToUInt32(Color.FromArgb(255, 0, 0));
bar.Color = bar.EndColor;

The following VFP sample adds a custom shape and defines a bar like above:

With thisform.Gantt1.Chart.Bars
	.AddShapeCorner(12345, 1)
	With .Add("Task2")
	    .Pattern = 2 && exPatternDot
	    .Shape = 20 && exShapeThinDown
	    .EndShape = 12345
	    .EndColor = RGB(255, 0, 0)
	    .Color = .EndColor
	EndWith
EndWith

The following VB sample defines a new bar that looks like this :

With .Chart.Bars.Add("Task2")
    .Pattern = exPatternShadow
    .Color = RGB(0, 0, 255)
    .EndShape = exShapeIconCircleDot
    .EndColor = RGB(255, 0, 0)
End With

The following C++ sample defines a bar that looks like this above:

CBar bar = m_gantt.GetChart().GetBars().Add("Task2");
bar.SetPattern( 3 /*exPatternShadow*/ );
bar.SetColor( RGB(0, 0, 255) );
bar.SetEndShape( 4 /* exShapeIconCircleDot*/ );
bar.SetEndColor( RGB(255, 0, 0) );

The following VB.NET sample defines a bar that looks like this above:

With AxGantt1.Chart.Bars.Add("Task2")
    .Pattern = EXGANTTLib.PatternEnum.exPatternShadow
    .Color = RGB(0, 0, 255)
    .EndShape = EXGANTTLib.ShapeCornerEnum.exShapeIconCircleDot
    .EndColor = RGB(255, 0, 0)
End With

The following C# sample defines a bar that looks like this above:

EXGANTTLib.Bar bar = axGantt1.Chart.Bars.Add("Task2");
bar.Pattern = EXGANTTLib.PatternEnum.exPatternShadow;
bar.Color = ToUInt32(Color.FromArgb(0, 0, 255));
bar.EndShape = EXGANTTLib.ShapeCornerEnum.exShapeIconCircleDot;
bar.EndColor = ToUInt32(Color.FromArgb(255, 0, 0));

The following VFP sample defines a bar that looks like this above:

with thisform.Gantt1.Chart.Bars.Add("Task2")
	.Pattern = 3 && exPatternShadow
	.Color = RGB(0, 0, 255)
	.EndShape = 4 && exShapeIconCircleDot
	.EndColor = RGB(255, 0, 0)
EndWith


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