property Grid.ScrollPartCaptionAlignment(ScrollBar as ScrollBarEnum, Part as ScrollPartEnum) as AlignmentEnum
Specifies the alignment of the caption in the part of the scroll bar.

TypeDescription
ScrollBar as ScrollBarEnum A ScrollBar expression that indicates the scrollbar where the caption is displayed.
Part as ScrollPartEnum A ScrollPartEnum expression that specifies the parts of the scroll where the text is displayed
AlignmentEnum An AlignmentEnum expression that specifies the alignment of the caption in the part of the scrollbar.
The ScrollPartCaptionAlignment property specifies the alignment of the caption in the part of the scroll bar. By default, the caption is centered. Use the ScrolPartCaption property to specify the caption being displayed on specified part of the scroll bar. Use the ScrollPartVisible property to add or remove buttons/parts in the control's scrollbar.

The following VB sample displays "left" aligned to the left on the lower part of the control's horizontal scroll bar, and "right" aligned to the right on the upper part of the control's horizontal scroll bar:

With Grid1
	.ScrollPartCaption(exHScroll,exLowerBackPart) = "left"
	.ScrollPartCaptionAlignment(exHScroll,exLowerBackPart) = LeftAlignment
	.ScrollPartCaption(exHScroll,exUpperBackPart) = "right"
	.ScrollPartCaptionAlignment(exHScroll,exUpperBackPart) = RightAlignment
	.ColumnAutoResize = False
	.Columns.Add 1
	.Columns.Add 2
	.Columns.Add 3
	.Columns.Add 4
End With

The following VB.NET sample displays "left" aligned to the left on the lower part of the control's horizontal scroll bar, and "right" aligned to the right on the upper part of the control's horizontal scroll bar:

With AxGrid1
	.set_ScrollPartCaption(EXGRIDLib.ScrollBarEnum.exHScroll,EXGRIDLib.ScrollPartEnum.exLowerBackPart,"left")
	.set_ScrollPartCaptionAlignment(EXGRIDLib.ScrollBarEnum.exHScroll,EXGRIDLib.ScrollPartEnum.exLowerBackPart,EXGRIDLib.AlignmentEnum.LeftAlignment)
	.set_ScrollPartCaption(EXGRIDLib.ScrollBarEnum.exHScroll,EXGRIDLib.ScrollPartEnum.exUpperBackPart,"right")
	.set_ScrollPartCaptionAlignment(EXGRIDLib.ScrollBarEnum.exHScroll,EXGRIDLib.ScrollPartEnum.exUpperBackPart,EXGRIDLib.AlignmentEnum.RightAlignment)
	.ColumnAutoResize = False
	.Columns.Add 1
	.Columns.Add 2
	.Columns.Add 3
	.Columns.Add 4
End With

The following C# sample displays "left" aligned to the left on the lower part of the control's horizontal scroll bar, and "right" aligned to the right on the upper part of the control's horizontal scroll bar:

axGrid1.set_ScrollPartCaption(EXGRIDLib.ScrollBarEnum.exHScroll,EXGRIDLib.ScrollPartEnum.exLowerBackPart,"left");
axGrid1.set_ScrollPartCaptionAlignment(EXGRIDLib.ScrollBarEnum.exHScroll,EXGRIDLib.ScrollPartEnum.exLowerBackPart,EXGRIDLib.AlignmentEnum.LeftAlignment);
axGrid1.set_ScrollPartCaption(EXGRIDLib.ScrollBarEnum.exHScroll,EXGRIDLib.ScrollPartEnum.exUpperBackPart,"right");
axGrid1.set_ScrollPartCaptionAlignment(EXGRIDLib.ScrollBarEnum.exHScroll,EXGRIDLib.ScrollPartEnum.exUpperBackPart,EXGRIDLib.AlignmentEnum.RightAlignment);
axGrid1.ColumnAutoResize = false;
axGrid1.Columns.Add(1.ToString());
axGrid1.Columns.Add(2.ToString());
axGrid1.Columns.Add(3.ToString());
axGrid1.Columns.Add(4.ToString());

The following C++ sample displays "left" aligned to the left on the lower part of the control's horizontal scroll bar, and "right" aligned to the right on the upper part of the control's horizontal scroll bar:

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import "ExGrid.dll"
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutScrollPartCaption(EXGRIDLib::exHScroll,EXGRIDLib::exLowerBackPart,L"left");
spGrid1->PutScrollPartCaptionAlignment(EXGRIDLib::exHScroll,EXGRIDLib::exLowerBackPart,EXGRIDLib::LeftAlignment);
spGrid1->PutScrollPartCaption(EXGRIDLib::exHScroll,EXGRIDLib::exUpperBackPart,L"right");
spGrid1->PutScrollPartCaptionAlignment(EXGRIDLib::exHScroll,EXGRIDLib::exUpperBackPart,EXGRIDLib::RightAlignment);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
spGrid1->GetColumns()->Add(L"1");
spGrid1->GetColumns()->Add(L"2");
spGrid1->GetColumns()->Add(L"3");
spGrid1->GetColumns()->Add(L"4");

The following VFP sample displays "left" aligned to the left on the lower part of the control's horizontal scroll bar, and "right" aligned to the right on the upper part of the control's horizontal scroll bar:

with thisform.Grid1
	.ScrollPartCaption(1,512) = "left"
	.ScrollPartCaptionAlignment(1,512) = 0
	.ScrollPartCaption(1,128) = "right"
	.ScrollPartCaptionAlignment(1,128) = 2
	.ColumnAutoResize = .F.
	.Columns.Add(1)
	.Columns.Add(2)
	.Columns.Add(3)
	.Columns.Add(4)
endwith