HeaderPane
Main
Hide
Share Link
Print

MakeOptimal Method, SftBoxRowHeaders Object

Sets the row header area's optimal width.

Syntax

C#void object.MakeOptimal(int MaxScan);
VB.NETobject.MakeOptimal(ByVal MaxScan As Integer)
C++HRESULT object->MakeOptimal(long MaxScan);
CHRESULT object->raw_MakeOptimal(long MaxScan);

object

A SftBoxRowHeaders object.

MaxScan

The maximum number of items analyzed to determine the optimal row header width. If 0 is specified, all items will be considered.

Comments

The MakeOptimal method sets the row header area's optimal width.

This method resizes the row header so that the row header text and graphics can be completely displayed without being truncated or clipped. The RowHeaders.CalcOptimalWidth method can be used calculate the optimal width without resizing the row header area. The row header width can be changed using the RowHeaders.Width property.

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. MakeOptimal 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


Last Updated 11/22/2026 - (email)
© 2026 Softel vdm, Inc.