Spread Silverlight Documentation
GrapeCity.Windows.SpreadSheet.Data Namespace / Worksheet Class / GetActualColumnWidth Method / GetActualColumnWidth(Int32,SheetArea) Method
The column index.
The sheet area.
Example


In This Topic
    GetActualColumnWidth(Int32,SheetArea) Method
    In This Topic
    Gets the width in pixels for the specified column in the specified sheet area.
    Syntax
    'Declaration
     
    Public Overloads Function GetActualColumnWidth( _
       ByVal column As System.Integer, _
       ByVal sheetArea As SheetArea _
    ) As System.Double
    'Usage
     
    Dim instance As Worksheet
    Dim column As System.Integer
    Dim sheetArea As SheetArea
    Dim value As System.Double
     
    value = instance.GetActualColumnWidth(column, sheetArea)
    public System.double GetActualColumnWidth( 
       System.int column,
       SheetArea sheetArea
    )

    Parameters

    column
    The column index.
    sheetArea
    The sheet area.

    Return Value

    Returns the width of the column range in pixels.
    Example
    This example uses the GetActualColumnWidth method.
    listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetActualColumnWidth(1, GrapeCity.Windows.SpreadSheet.Data.SheetArea.ColumnHeader).ToString());
    listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetActualColumnWidth(2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.ColumnHeader).ToString());
    listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetActualRowHeight(2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells).ToString());
    listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetActualRowHeight(5, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells).ToString());
    listBox1.Items.Add(gcSpreadSheet1.Sheets[0].GetActualRowVisible(11,GrapeCity.Windows.SpreadSheet.Data.SheetArea.RowHeader).ToString());
    listBox1.Items.Add(gcSpreadSheet1.Sheets(0).GetActualColumnWidth(1, GrapeCity.Windows.SpreadSheet.Data.SheetArea.ColumnHeader).ToString())
    listBox1.Items.Add(gcSpreadSheet1.Sheets(0).GetActualColumnWidth(2, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.ColumnHeader).ToString())
    listBox1.Items.Add(gcSpreadSheet1.Sheets(0).GetActualRowHeight(2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells).ToString())
    listBox1.Items.Add(gcSpreadSheet1.Sheets(0).GetActualRowHeight(5, 2, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells).ToString())
    listBox1.Items.Add(gcSpreadSheet1.Sheets(0).GetActualRowVisible(11,GrapeCity.Windows.SpreadSheet.Data.SheetArea.RowHeader).ToString())
    Requirements

    Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

    See Also