Programming with Reflection

image\rwnprg32.gif PasteRange method

 

Syntax object.PasteRange Top, Left, Bottom, Right, RemTop, RemLeft, RemBottom, RemRight, Key, WrapText, UseFieldDelim

 

Description

Pastes the contents of the Clipboard to the current screen and, if needed, multiple screens in the host application. The arguments define the region in the host screen(s) to be used for the paste operation, the terminal key used to scroll to subsequent screens, and how Reflection handles word wrap and field delimiters.

Values for the position arguments (the first eight) can be positive, zero, or negative. Positive row values are counted down from the top of the screen, zero is the last row on the screen, and negative values are counted up from the last row. Positive column arguments are counted from the left edge of the screen, zero is the last column on the screen, and negative values are counted back from the last column. For example, to start pasting the first screen at the upper-left corner of the screen, set Top = 1 and Left = 1. To end pasting at the lower-right corner of the screen, set Bottom = 0 and Right = 0, as shown here:

Session.PasteRange 1, 1, 0, 0, 1, 1, 0, 0, rcIBMPF8Key, rcYes, rcNo

Arguments

Top Argument type: Integer
The starting row coordinate for the first screen.

Left Argument type: Integer
The starting column coordinate for the first screen.

Bottom Argument type: Integer
The ending row coordinate for the first screen.

Right Argument type: Integer
The ending column coordinate for the first screen.

RemTop Argument type: Integer
The starting row coordinate for the remaining screens.

RemLeft Argument type: Integer
The starting column coordinate for the remaining screens.

RemBottom Argument type: Integer
The ending row coordinate for the remaining screens.

RemRight Argument type: Integer
The ending column coordinate for the remaining screens.

Key Argument type: Enumeration
The terminal key to use to scroll to the second and remaining screens in the paste range. Click here to see a list of values for 3270 terminals. Click here to see a list of values for 5250 terminals.

WrapText Argument type: Boolean
Determines what happens when text to be copied exceeds the current line length. If this value is True, remaining text in the line will be pasted at the start of the next field. If it is False, Reflection will truncate the current line and begin pasting at the next field with the beginning of a new line.

UseFieldDelim Argument type: Boolean
Affects where Reflection tries to paste text after reaching a new line in the Clipboard. Reflection will attempt to paste on the next row at the same column location where the paste began. UseFieldDelim controls what happens if the new location is protected.

 False

 Pasting stops and any text remaining in the Clipboard is placed into the PasteNext buffer.

 True

 Reflection continues to search for subsequent fields, searching first right and then down, until it finds another unprotected field. If an unprotected field is located, pasting starts in this field; if not, pasting stops and any remaining text is put into the PasteNext buffer.

 

Note: You can abort a Paste Range operation with ResetCommands. This command is mapped by default to Ctrl+Alt+R.

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command