SftBox/OCX 4.5

SftBoxRowHeaders.MakeOptimal Method

Softel vdm, Inc.

Sets the row header area's optimal width.

Syntax       

VB.NET

object.MakeOptimal(ByVal MaxScan As Integer)

VB

object.MakeOptimal(ByVal MaxScan As Long)

C#.NET

void object.MakeOptimal(int MaxScan);

VC++

HRESULT object->MakeOptimal(long MaxScan);

C

HRESULT object->raw_MakeOptimal(long MaxScan);

Delphi

procedure object.MakeOptimal(MaxScan : Integer);

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.


Feedback / comments / error reports for this topic
© 2008 - Softel vdm, Inc. - www.softelvdm.com