GrapeCity.Xaml.SpreadSheet.Data
SetViewportHeight Method
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class : SetViewportHeight Method
The index of the row viewport.
The height value.
Sets the height of the viewport.
Syntax
'Declaration
 
Public Sub SetViewportHeight( _
   ByVal rowViewportIndex As Integer, _
   ByVal value As Integer _
) 
'Usage
 
Dim instance As Worksheet
Dim rowViewportIndex As Integer
Dim value As Integer
 
instance.SetViewportHeight(rowViewportIndex, value)
public void SetViewportHeight( 
   int rowViewportIndex,
   int value
)

Parameters

rowViewportIndex
The index of the row viewport.
value
The height value.
Example
This example uses the SetViewportHeight method.
private void Grid_Loaded_1(object sender, RoutedEventArgs e)
        {
            gcSpreadSheet1.AddColumnViewport(0, 100);
            gcSpreadSheet1.AddRowViewport(0, 80);
            gcSpreadSheet1.RowSplitBoxAlignment = GrapeCity.Xaml.SpreadSheet.UI.SplitBoxAlignment.Leading;
            gcSpreadSheet1.ColumnSplitBoxAlignment = GrapeCity.Xaml.SpreadSheet.UI.SplitBoxAlignment.Trailing;
            gcSpreadSheet1.Sheets[0].SetViewportHeight(0, 100);
            gcSpreadSheet1.Sheets[0].SetViewportWidth(0, 100);
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            gcSpreadSheet1.RemoveColumnViewport(0);
            gcSpreadSheet1.RemoveRowViewport(0);           
        }
Private Sub MainPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded        
        gcSpreadSheet1.AddColumnViewport(0, 100)
        gcSpreadSheet1.AddRowViewport(0, 80)
        gcSpreadSheet1.RowSplitBoxAlignment = GrapeCity.Xaml.SpreadSheet.UI.SplitBoxAlignment.Leading
        gcSpreadSheet1.ColumnSplitBoxAlignment = GrapeCity.Xaml.SpreadSheet.UI.SplitBoxAlignment.Trailing
        gcSpreadSheet1.Sheets(0).SetViewportHeight(0, 100)
        gcSpreadSheet1.Sheets(0).SetViewportWidth(0, 100)     
    End Sub

    Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)        
        gcSpreadSheet1.RemoveColumnViewport(0)
        gcSpreadSheet1.RemoveRowViewport(0)
    End Sub
See Also

Reference

Worksheet Class
Worksheet Members