Vcl.Mask.TCustomMaskEdit.GetSel

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

procedure GetSel(var SelStart: Integer; var SelStop: Integer);

C++

void __fastcall GetSel(int &SelStart, int &SelStop);

プロパティ

種類 可視性 ソース ユニット
procedure
function
protected
Vcl.Mask.pas
Vcl.Mask.hpp
Vcl.Mask TCustomMaskEdit

説明

EditText プロパティにおける現在の選択の始点と終点を返します。

GetSel メソッドを呼び出すと,先頭文字のインデックスが 0 である EditText で選択された文字の先頭と末尾のインデックス値を取得できます。マスクがリテラル文字を含む場合,必ずしもすべての文字が編集可能なわけではありません。マスクがある場合,結果として得られるインデックス値を Text プロパティには使用しないでください。EditText は Text にはない空白文字あるいは非リテラル文字を含んでいる場合があるからです。

選択したテキストをプログラムで変更するには,GetNextEditChar を使って SelStart から SelStop までの選択範囲にある編集可能な文字を一巡します。

関連項目