Gets the height in pixels of the tallest cell (based on text content) in the specified row on this sheet.
Syntax
Example
This example returns the height of tallest cell (based on text contents) in the first row on this sheet.
C# | Copy Code |
---|
private void GetPrintHeight(Graphics g, float pwidth, FarPoint.Win.Spread.SheetView sheet)
{
sheet = fpSpread1.ActiveSheet;
pwidth = sheet.GetPreferredPrintRowHeight(g, 0);
}
private void button1_Click(object sender, System.EventArgs e)
{
Graphics g;
float pw = 0;
g = fpSpread1.CreateGraphics();
GetPrintHeight(g, pw, fpSpread1.ActiveSheet);
MessageBox.Show(pw.ToString());
} |
Visual Basic | Copy Code |
---|
Private Sub GetPrintHeight(ByVal g As Graphics, ByVal pwidth As Single, ByVal sheet As FarPoint.Win.Spread.SheetView)
sheet = FpSpread1.ActiveSheet
pwidth = sheet.GetPreferredPrintRowHeight(g, 0)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim g As Graphics
Dim pw As Single
g = FpSpread1.CreateGraphics()
GetPrintHeight(g, pw, FpSpread1.ActiveSheet)
MessageBox.Show(sngl.ToString())
End Sub |
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