Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / ExtendSelectionRect Method
The row in which the selection ends.
The column in which the selection ends.
Example
In This Topic
    ExtendSelectionRect Method (Screen)
    In This Topic
    Selects all text in the terminal window in all rows between the specified starting and ending coordinates.
    Syntax
    expression.ExtendSelectionRect( _
       ByVal row As Integer, _
       ByVal column As Integer _
    ) 
    where expression is a variable that represents a Screen Object

    Parameters

    row
    The row in which the selection ends.
    column
    The column in which the selection ends.
    Exceptions
    ExceptionDescription
    This exception is thrown if the row or column parameters are outside the range of valid values: (1 to Rows) or (1 to Columns).
    Remarks
    Use the SetSelectionStartPos method to set the starting coordinates.
    Example
    This example sets a selection point, extends it, and copies the selected area to the clipboard.
    Sub SetAndExtendSelection()
     
        Dim rcode As ReturnCode
        
        Dim StartSel As ScreenPoint
        
        Dim EndColPoint As ScreenPoint
        Dim EndCol As Integer
        
        Dim EndRowPoint As ScreenPoint
        Dim EndRow As Integer
        
        
        Dim EndSel As ScreenPoint
        
       'Get the last column in the table
        Set EndColPoint = ThisScreen.SearchText3("Profit", 1, 1, ThisScreen.DisplayRows, ThisScreen.DisplayColumns, FindOptions_Forward)
        EndCol = EndColPoint.column + Len("Point")
     
        'Get the last row in the table
        Set EndRowPoint = ThisScreen.SearchText3("Dec", 1, 1, ThisScreen.DisplayRows, ThisScreen.DisplayColumns, FindOptions_Forward)
        EndRow = EndRowPoint.row
     
        'Get the location for the start of the selection
        Set StartSel = ThisScreen.SearchText3("Jan", 1, 1, ThisScreen.DisplayRows, ThisScreen.DisplayColumns, FindOptions_Forward)
        
     
        'Set the start of the selection
        ThisScreen.SetSelectionStartPos StartSel.row, StartSel.column
        
        'Extend the selection to the last row and column in the table
        ThisScreen.ExtendSelectionRect EndRow, EndCol
        
        'Copy the selected area to the clipboard
        rcode = ThisScreen.Copy2(CopySourceOption_Selection)
       
     
    End Sub
    See Also