SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the current horizontal scrolling extent.
Get
VB.NET | Extent = object.HorizontalExtent As Integer |
VB | Extent = object.HorizontalExtent As Long |
C#.NET | int Extent = object.HorizontalExtent; |
VC++ | long Extent = object->HorizontalExtent; long Extent = object->GetHorizontalExtent(); |
C | HRESULT object->get_HorizontalExtent(long* Extent); |
Put
VB.NET | object.HorizontalExtent = Extent As Integer |
VB | object.HorizontalExtent = Extent As Long |
C#.NET | int object.HorizontalExtent = Extent; |
VC++ | long object->HorizontalExtent = Extent; void object->PutHorizontalExtent(long Extent); |
C | HRESULT object->put_HorizontalExtent(long Extent); |
object
Extent
Defines the horizontal scrolling extent. If this value is 0 (or less than the width of the control), horizontal scrolling is disabled. The units used are pixels.
The HorizontalExtent property defines the current horizontal scrolling extent.
The displayable area of the drop down portion can be wider than the window width. If the displayable area is wider, the control can be scrolled horizontally if it has a horizontal scroll bar (see Scrollbars property). The width of the displayable area can be set by the application using the Items.RecalcHorizontalExtent method or the Items.HorizontalExtent property. For performance reasons, the optimal width is not automatically calculated when adding items to a control.
The width Extent set using this property must be equal to or greater than the combined column widths plus the width returned by the Columns.OverheadWidth property.
If the width set is smaller than the actual drop down portion width, the drop down portion cannot be scrolled horizontally. The horizontal scroll bar will be disabled or hidden, based on the Scrollbars property.
By default, the control does not handle horizontal scrolling, even if the Scrollbars property defines scroll bars to be available. To start horizontal scrolling, an application has to use the Items.RecalcHorizontalExtent method or the Items.HorizontalExtent property. They indicate to the control that horizontal scrolling support is desired and allows it to determine the horizontal scrolling extent.
The control doesn't automatically update the horizontal extent when items are added or deleted or other methods or properties are used, which may invalidate the horizontal extent. The Items.RecalcHorizontalExtent method or Items.HorizontalExtent property have to be used again to recalculate or redefine the extent.
This property is not available at design-time.
AddCompany("Wilman Kala", "Matti Karttunen", "Owner/Marketing Assistant", "Keskuskatu 45", "Helsinki", "", "21240", "Finland", "90-224 8858", "90-224 8858") AddCompany("Wolski Zajazd", "Zbyszek Piestrzeniewicz", "Owner", "ul. Filtrowa 68", "Warszawa", "", "01-012", "Poland", "(26) 642-7012", "(26) 642-7012") companyList.BulkUpdate = False companyList.Columns.MakeOptimal(0) companyList.Items.RecalcHorizontalExtent(0) PerformSort(0, SftBoxSortConstants.sortSftBoxAscending) ' Adjust horizontal extent so we can scroll to the right edge of the header companyList.Items.HorizontalExtent = companyList.Items.HorizontalExtent + companyList.Width companyList.Items.Select("Softel vdm, Inc.", 0, 0, False, True, False) countryList.Items.Add("Austria") countryList.Items.Add("Australia") countryList.Items.Add("Belgium") countryList.Items.Add("Canada")
CompanyList.Header(ColNum).Image.Appearance = sftImageSortAsc End If SortedColumn = ColNum PerformSort ElseIf AreaType = areaSftBoxColumnRes Then CompanyList.Column(ColNum).MakeOptimal 0 CompanyList.Items.RecalcHorizontalExtent 0 ' Adjust horizontal extent so we can scroll to the right edge of the header CompanyList.Items.HorizontalExtent = CompanyList.Items.HorizontalExtent + (CompanyList.Width / Screen.TwipsPerPixelX) End If End Sub Private Sub Form_Load() AddCompany "Softel vdm, Inc.", "", "", "5401 S Kirkman Rd Ste 310", "Punta Gorda", "FL", "32819", "United States", "(941) 505-8600", "(941) 882-1800"
AddCompany("Wilman Kala", "Matti Karttunen", "Owner/Marketing Assistant", "Keskuskatu 45", "Helsinki", "", "21240", "Finland", "90-224 8858", "90-224 8858"); AddCompany("Wolski Zajazd", "Zbyszek Piestrzeniewicz", "Owner", "ul. Filtrowa 68", "Warszawa", "", "01-012", "Poland", "(26) 642-7012", "(26) 642-7012"); companyList.BulkUpdate = false; companyList.Columns.MakeOptimal(0); companyList.Items.RecalcHorizontalExtent(0); PerformSort(0, SftBoxSortConstants.sortSftBoxAscending); // Adjust horizontal extent so we can scroll to the right edge of the header companyList.Items.HorizontalExtent = companyList.Items.HorizontalExtent + companyList.Width; companyList.Items.Select("Softel vdm, Inc.", 0, 0, false, true, false); countryList.Items.Add("Austria"); countryList.Items.Add("Australia"); countryList.Items.Add("Belgium"); countryList.Items.Add("Canada");
vCompanyList->BulkUpdate = VARIANT_FALSE; vCompanyList->Columns->MakeOptimal(0); vCompanyList->Items->RecalcHorizontalExtent(0); PerformSort(0, sortSftBoxAscending); // Adjust horizontal extent so we can scroll to the right edge of the header CRect rect; m_CompanyList.GetClientRect(&rect); vCompanyList->Items->HorizontalExtent = vCompanyList->Items->HorizontalExtent + rect.Width(); vCompanyList->Items->Select("Softel vdm, Inc.", 0, 0, VARIANT_FALSE, VARIANT_TRUE, VARIANT_FALSE); ISftBoxPtr vCountryList = m_CountryList.GetControlUnknown(); vCountryList->PutFont(NULL); vCountryList->Edit->PutFont(NULL); vCountryList->Items->Add("Austria");
See Also SftBoxItems Object | Object Hierarchy