GrapeCity MultiRow Windows Forms Documentation
AddViewport Method
Example 


The relative position of the new viewport within the viewport column.
The relative position of the new viewport within the viewport row.
Adds the viewport at the specified location.
Syntax
<EditorBrowsableAttribute(EditorBrowsableState.Advanced)>
Public Sub AddViewport( _
   ByVal verticalIndex As Integer, _
   ByVal horizontalIndex As Integer _
) 
Dim instance As GcMultiRow
Dim verticalIndex As Integer
Dim horizontalIndex As Integer
 
instance.AddViewport(verticalIndex, horizontalIndex)
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void AddViewport( 
   int verticalIndex,
   int horizontalIndex
)

Parameters

verticalIndex
The relative position of the new viewport within the viewport column.
horizontalIndex
The relative position of the new viewport within the viewport row.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeException

Both the horizontalIndex and verticalIndex are less than zero.

-or-

The verticalIndex is equal to or greater than the number of viewports in the vertical orientation.

-or-

The verticalIndex is less than -1.

-or-

The horizontalIndex is equal to or greater than the number of viewports in the horizontal orientation.

-or-

The horizontalIndex is less than -1.

Remarks

If both verticalIndex and horizontalIndex are valid, a row of viewports and a column of viewports would be added.

If only verticalIndex is valid, a row of viewports would be added.

If only horizontalIndex is valid, a column of viewports would be added.

Example
The following code example shows how to use this method to add viewports.This code example is part of a larger example provided for the SplitMode property.
void addViewportButton_Click(object sender, EventArgs e)
        {
            this.gcMultiRow1.AddViewport(0, -1);
        }
Private Sub addViewportButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles addViewportButton.Click
        Me.gcMultiRow1.AddViewport(0, -1)
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GcMultiRow Class
GcMultiRow Members
RemoveSplit Method
InsertSplit Method

 

 


Copyright © GrapeCity, inc. All rights reserved.