Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

BestDimensions Method, CellBaseClass Class

Calculates the best dimensions for the current cell.

Class: CellBaseClass
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET

Syntax

public virtual Size BestDimensions(
    Graphics g,
    int proposedWidth );
Public Overridable Function BestDimensions(
    ByVal g As Graphics,
    ByVal proposedWidth As Integer
  ) As Size

Parameters

g

Defines the drawing surface or null/Nothing if unavailable.

proposedWidth

The cell's maximum allowable width or -1 (see below).

Return Value

The dimensions of the cell.

Comments

Calculates the best dimensions for the current cell.

BestDimensions calculates the cell's dimensions based on the available width (proposedWidth). If the width is limited, the cell may be able to grow in height, for example by wrapping text around. item, including all the cell's subordinate cells are used to determine the best dimensions.

as the available width (plus the additional width made available by subordinate cells).

See Also CellBaseClass Class | Classes | SftTree/NET 2.0