ITextSelection.MoveRight(TextRangeUnit, Int32, Boolean) 方法

定義

將插入點或文字選取範圍的使用中結尾向右移動,並模擬向右鍵的功能。

public:
 int MoveRight(TextRangeUnit unit, int count, bool extend);
int MoveRight(TextRangeUnit const& unit, int const& count, bool const& extend);
public int MoveRight(TextRangeUnit unit, int count, bool extend);
function moveRight(unit, count, extend)
Public Function MoveRight (unit As TextRangeUnit, count As Integer, extend As Boolean) As Integer

參數

unit
TextRangeUnit

要移動插入點或作用中結束的單位。 下列值有效。

對應的按鍵組合意義
字元向右鍵將一個字元位置向右移動。 此為預設值。
WordCtrl+向右鍵向右移動一個字。
count
Int32

int

要移動的單位數。 預設值為 1。 如果 count 小於零,則移動會向左移動。

extend
Boolean

bool

指出如何變更選取範圍。 如果為 True,則只會移動使用中結尾來擴充選取範圍。 False 會將選取範圍折迭至插入點,然後移動插入點。 預設值為 false。

傳回

Int32

int

插入點或作用中結束移動的單位數。 折迭選取範圍會計算為一個單位。

備註

除了單元中所述的按鍵組合之外,非零擴充值會對應到按下的 Shift 鍵。

適用於

另請參閱