Softelvdm.Controls Class Library for Windows Controls 1.0

BestDimensions Method, CellBaseClass Class

Softel vdm, Inc.

Calculates the best dimensions for the current cell.

Syntax      CellBaseClass Class (Softelvdm.Controls)

VB   

Public Overridable Function BestDimensions( _
     ByVal g As Graphics, _
     ByVal proposedWidth As Integer _
  ) As Size

C#   

public virtual Size BestDimensions(
     Graphics g,
     int proposedWidth );

C++   

public: virtual Size BestDimensions(
     Graphics^ g,
     int proposedWidth );

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

The BestDimensions method 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.

SftTree/NET 2.0: If the proposedWidth argument is set to -1, the defined column width (ColumnClass.Width) is used as the available width (plus the additional width made available by subordinate cells).

SftTabs/NET 6.0: If -1 is specified for the proposedWidth argument, the space need to display the tab contents in their entirety is calculated.

Version Information

Supported in version 1.0.
Products Table


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