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
Returns the row header area's optimal width in pixels.
VB.NET | WidthPix = object.CalcOptimalWidthPix(ByVal MaxScan As Integer) As Integer |
VB | WidthPix = object.CalcOptimalWidthPix(ByVal MaxScan As Long) As Long |
C#.NET | int WidthPix = object.CalcOptimalWidthPix(int MaxScan); |
VC++ | long WidthPix = object->CalcOptimalWidthPix(long MaxScan); |
C | HRESULT object->raw_CalcOptimalWidthPix(long MaxScan, long* WidthPix); |
object
MaxScan
The maximum number of items analyzed to determine the optimal row header width. If 0 is specified, all items will be considered.
WidthPix
Returns the row header area's optimal width in pixels.
The CalcOptimalWidthPix method returns the row header area's optimal width in pixels.
The RowHeaders.CalcOptimalWidth and CalcOptimalWidthPix methods are synonyms, but may use different coordinate systems.
This method calculates the optimal width of the row header so that 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 width without having to calculate it first.
By changing control properties, the optimal row header width may change. Adding items, setting new row header attributes can affect the optimal row header width. The row header may have to be set again to allow row headers to be completely visible. The 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 control. CalcOptimalWidthPix scans all items to determine the best row header width, but can be limited to a specific number of items using the MaxScan argument. This reduces the time spent to calculate the optimal width, but may still leave some items clipped.
See Also SftBoxRowHeaders Object | Object Hierarchy