Spread Windows Forms 7.0 Product Documentation
GetPreferredCellSize Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : GetPreferredCellSize Method


row
Row index
col
Column index

Glossary Item Box

Gets the desired size of the given cell on this sheet.

Syntax

Visual Basic (Declaration) 
Public Function GetPreferredCellSize( _
   ByVal row As Integer, _
   ByVal col As Integer _
) As Size
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim row As Integer
Dim col As Integer
Dim value As Size
 
value = instance.GetPreferredCellSize(row, col)
C# 
public Size GetPreferredCellSize( 
   int row,
   int col
)

Parameters

row
Row index
col
Column index

Return Value

Integer number of pixels of the size of the specified cell

Example

This example illustrates the use of this member by returning the preferred size for the specified cell.
C#Copy Code
System.Drawing.Size sz;
fpSpread1.ActiveSheet.SetValue(0, 0, "Let's get the preferred size");
sz = fpSpread1.ActiveSheet.GetPreferredCellSize(0,0);
listBox1.Items.Add(sz.ToString());
Visual BasicCopy Code
Dim sz As System.Drawing.Size
FpSpread1.ActiveSheet.SetValue(0, 0, "Let's get the preferred size")
sz = FpSpread1.ActiveSheet.GetPreferredCellSize(0, 0)
ListBox1.Items.Add(sz.ToString())

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.