Type | Description | |||
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 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 ComboBox1 .MinHeightList = 304 .ColumnAutoResize = True .MinHeightList = 304 .ColumnAutoResize = True .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 .Columns.Add 5 .Columns.Add 6 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 AxComboBox1 .MinHeightList = 304 .ColumnAutoResize = True .MinHeightList = 304 .ColumnAutoResize = True .set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exLowerBackPart,"left") .set_ScrollPartCaptionAlignment(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exLowerBackPart,EXCOMBOBOXLib.AlignmentEnum.LeftAlignment) .set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exUpperBackPart,"right") .set_ScrollPartCaptionAlignment(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exUpperBackPart,EXCOMBOBOXLib.AlignmentEnum.RightAlignment) .ColumnAutoResize = False .Columns.Add 1 .Columns.Add 2 .Columns.Add 3 .Columns.Add 4 .Columns.Add 5 .Columns.Add 6 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:
axComboBox1.MinHeightList = 304; axComboBox1.ColumnAutoResize = true; axComboBox1.MinHeightList = 304; axComboBox1.ColumnAutoResize = true; axComboBox1.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exLowerBackPart,"left"); axComboBox1.set_ScrollPartCaptionAlignment(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exLowerBackPart,EXCOMBOBOXLib.AlignmentEnum.LeftAlignment); axComboBox1.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exUpperBackPart,"right"); axComboBox1.set_ScrollPartCaptionAlignment(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exUpperBackPart,EXCOMBOBOXLib.AlignmentEnum.RightAlignment); axComboBox1.ColumnAutoResize = false; axComboBox1.Columns.Add(1.ToString()); axComboBox1.Columns.Add(2.ToString()); axComboBox1.Columns.Add(3.ToString()); axComboBox1.Columns.Add(4.ToString()); axComboBox1.Columns.Add(5.ToString()); axComboBox1.Columns.Add(6.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 'EXCOMBOBOXLib' for the library: 'ExComboBox 1.0 Control Library' #import "D:\\Exontrol\\ExComboBox\\project\\Demo\\ExComboBox.dll" using namespace EXCOMBOBOXLib; */ EXCOMBOBOXLib::IComboBoxPtr spComboBox1 = GetDlgItem(IDC_COMBOBOX1)->GetControlUnknown(); spComboBox1->PutMinHeightList(304); spComboBox1->PutColumnAutoResize(VARIANT_TRUE); spComboBox1->PutMinHeightList(304); spComboBox1->PutColumnAutoResize(VARIANT_TRUE); spComboBox1->PutScrollPartCaption(EXCOMBOBOXLib::exHScroll,EXCOMBOBOXLib::exLowerBackPart,L"left"); spComboBox1->PutScrollPartCaptionAlignment(EXCOMBOBOXLib::exHScroll,EXCOMBOBOXLib::exLowerBackPart,EXCOMBOBOXLib::LeftAlignment); spComboBox1->PutScrollPartCaption(EXCOMBOBOXLib::exHScroll,EXCOMBOBOXLib::exUpperBackPart,L"right"); spComboBox1->PutScrollPartCaptionAlignment(EXCOMBOBOXLib::exHScroll,EXCOMBOBOXLib::exUpperBackPart,EXCOMBOBOXLib::RightAlignment); spComboBox1->PutColumnAutoResize(VARIANT_FALSE); spComboBox1->GetColumns()->Add(L"1"); spComboBox1->GetColumns()->Add(L"2"); spComboBox1->GetColumns()->Add(L"3"); spComboBox1->GetColumns()->Add(L"4"); spComboBox1->GetColumns()->Add(L"5"); spComboBox1->GetColumns()->Add(L"6");
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.ComboBox1 .MinHeightList = 304 .ColumnAutoResize = .T. .MinHeightList = 304 .ColumnAutoResize = .T. .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) .Columns.Add(5) .Columns.Add(6) endwith