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
Calculates the row header's optimal width based on the contents of all row headers.
Deprecated - Provided for compatibility with earlier versions only - Use RowHeaders.OptimalWidth instead
VB.NET | Width = object.CalcOptimalRowHeaderWidth() As Single |
VB | Width = object.CalcOptimalRowHeaderWidth() As Single |
C#.NET | float Width = object.CalcOptimalRowHeaderWidth(); |
VC++ | float Width = object->CalcOptimalRowHeaderWidth(); |
C | HRESULT object->raw_CalcOptimalRowHeaderWidth(float* Width); |
object
Width
Returns the row header's optimal width based on the contents of all row headers. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.
Deprecated - Provided for compatibility with earlier versions only - Use RowHeaders.OptimalWidth instead
The CalcOptimalRowHeaderWidth method calculates the row header's optimal width based on the contents of all row headers.
This method calculates the optimal width of the row header area so that the row/column header's text and graphic and the row header text and graphics can be completely displayed without being truncated or clipped. The row header width can be changed using the RowHeaders.Width property. The RowHeaders.MakeOptimal method can be used to set the optimal row header width without having to calculate it first.
By changing tree control properties, the optimal row header width may change. Adding items, setting new row header graphics and changing row header text are a few of the actions that can affect the optimal row header width. The row header width may have to be set again to allow items to be completely visible. The tree control does not automatically adjust the row header width.
Calculating the optimal row header width can be a time consuming operation, particularly if many items have been added to the tree control. CalcOptimalRowHeaderWidth scans all items to determine the best column width, but can be limited to a specific number of items using the Items.CalcLimit property. This reduces the time spent to calculate the optimal width, but may still leave some items clipped.
If items are not visible because their parent items are collapsed, these can be excluded from the optimal width calculation by setting the Items.CalcVisibleOnly property to True.
See Also SftTree Object | Object Hierarchy