ITextSelection.MoveUp(TextRangeUnit, Int32, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Moves the insertion point or the active end of the text selection up, mimicking the functionality of the Up Arrow or Page Up keys.
public:
int MoveUp(TextRangeUnit unit, int count, bool extend);
int MoveUp(TextRangeUnit const& unit, int const& count, bool const& extend);
public int MoveUp(TextRangeUnit unit, int count, bool extend);
function moveUp(unit, count, extend)
Public Function MoveUp (unit As TextRangeUnit, count As Integer, extend As Boolean) As Integer
Parameters
- unit
- TextRangeUnit
The units by which to move the insertion point or active end. The following values are valid.
Value | Corresponding key combination | Meaning |
---|---|---|
Line | Up Arrow | Moves up one line. This is the default. |
Paragraph | Ctrl+Up Arrow | Moves up one paragraph. |
Screen | Page Up | Moves up one screen. |
Window | Ctrl+Page Up | Moves to the first character in the window. |
- count
-
Int32
int
The number of units to move. The default value is 1.
- extend
-
Boolean
bool
Indicates how to change the selection. True extends the selection by moving only the active end. False collapses the selection to an insertion point and then moves the insertion point. The default value is false.
Returns
int
The number of units the insertion point or active end is moved down. Collapsing the selection counts as one unit.
Remarks
A nonzero extend value corresponds to the Shift key being pressed in addition to the key combination described in unit.