Visual Basic (Declaration) | |
---|---|
Public Function GetPreferredHeight() As Single |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As Row Dim value As Single value = instance.GetPreferredHeight() |
C# | |
---|---|
public float GetPreferredHeight() |
Return Value
Single-precision, floating-point number of pixels in heightRow heights can be based on the data in the cells using this method or SheetView.GetPreferredRowHeight method. For more information, see Resizing the Row and Column to Fit the Data.
This example determines the height of the row based on the text in the first cell.
C# | Copy Code |
---|---|
FarPoint.Win.Spread.Row row; float size; row = fpSpread1.ActiveSheet.Rows[0]; fpSpread1.ActiveSheet.Cells[0, 0].Text = "This text will be used to determine the height of the row."; size = row.GetPreferredHeight(); row.Height = size; |
Visual Basic | Copy Code |
---|---|
Dim row As FarPoint.Win.Spread.Row Dim size As Single row = FpSpread1.ActiveSheet.Rows(0) FpSpread1.ActiveSheet.Cells(0, 0).Text = "This text will be used to determine the height of the row." size = row.GetPreferredHeight() row.Height = size |
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8
Reference
Row ClassRow Members
GetPreferredRowHeight Method