Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmScreen Object / ExtendSelection Method
The row in which the selection ends.
The column in which the selection ends.
Example
ExtendSelection Method (IbmScreen)
Selects all text in the terminal window between the selection start position and the specified coordinates.
Syntax
expression.ExtendSelection( _
   ByVal row As Integer, _
   ByVal column As Integer _
) 
where expression is a variable that represents a IbmScreen 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. (The default starting position is row 1, column 1.)

The ExtendSelection method selects the stream from the starting position coordinates to the extended position coordinates and returns a text selection shaped like this:

xxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxx

The ExtendSelectionRect method selects a rectangular block of text between the starting and ending row. The starting and the ending coordinate columns define the vertical edges of the block. The resulting block of text is shaped like this:

xxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxx

If the ending coordinates are smaller than the starting coordinates, the ExtendSelectionRect and ExtendSelection methods select text backwards (from right to left or bottom to top).

These methods do not return the selected area. To get the selected region and its properties, use the ScreenRegion object.

Example
This sample selects a text area when the screen is ready. It also gets the selected screen region.
Private Sub IbmScreen_NewScreenReady(ByVal sender As Variant)
    
    Dim screenRegionIbm As ScreenRegion
    
    'Select the text area
    ThisIbmScreen.SetSelectionStartPos 5, 5
    ThisIbmScreen.ExtendSelection 21, 21
    
    'Get the selected screen region
    Set screenRegionIbm = ThisIbmScreen.selection
    MsgBox ("Start Row = " & screenRegionIbm.StartRow & ", End Column = " & screenRegionIbm.EndColumn)
 
End Sub
See Also