Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

CalcOptimalCell Method, SftTreeItems Object

Returns the size of the cell contents.

Syntax

VB.NETobject.CalcOptimalCell(ByVal ItemIndex As Integer, ByVal ColIndex As Short, ByVal AvailableWidth As Integer, ByRef WidthPix As Integer, ByRef HeightPix As Integer)
VBobject.CalcOptimalCell(ByVal ItemIndex As Long, ByVal ColIndex As Integer, ByVal AvailableWidth As Integer, WidthPix As Integer, HeightPix As Integer)
C#.NETvoid object.CalcOptimalCell(int ItemIndex, short ColIndex, int AvailableWidth, out int WidthPix, out int HeightPix);
VC++HRESULT object->CalcOptimalCell(long ItemIndex, short ColIndex, int AvailableWidth, int* WidthPix, int* HeightPix);
CHRESULT object->raw_CalcOptimalCell(long ItemIndex, short ColIndex, int AvailableWidth, int* WidthPix, int* HeightPix);

object

A SftTreeItems object.

ItemIndex

The zero-based index of the item.

ColIndex

The zero-based column number of the cell whose optimal width is to be calculated.

AvailableWidth

The width available to display the cell contents or 0 to calculate the optimal width and height without any constraints in width.

WidthPix

Returns the optimal width of the cell, in pixels.

HeightPix

Returns the optimal height of the cell, in pixels.

Comments

The CalcOptimalCell method returns the size of the cell contents.

This method can be used to calculate the best width and height for a cell.

The Column.OptimalWidth method can be used to calculate a column's optimal width. The Column.MakeOptimal method can be used to set a column's optimal width without having to calculate it first.

See Also SftTreeItems Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.