Language

MaskedTextBox.InsertKeyMode プロパティ

定義

マスクされたテキスト ボックス コントロールのテキスト挿入モードを取得または設定します。

public:
 property System::Windows::Forms::InsertKeyMode InsertKeyMode { System::Windows::Forms::InsertKeyMode get(); void set(System::Windows::Forms::InsertKeyMode value); };
public System.Windows.Forms.InsertKeyMode InsertKeyMode { get; set; }
member this.InsertKeyMode : System.Windows.Forms.InsertKeyMode with get, set
Public Property InsertKeyMode As InsertKeyMode

プロパティ値

現在の挿入モードを示す InsertKeyMode 値。 既定値は Default です。

例外

このプロパティを設定するときに無効な InsertKeyMode 値が指定されました。

注釈

InsertKeyMode プロパティは、MaskedTextBox コントロールの文字挿入動作を制御します。 このプロパティの状態は、常にオン、常にオフ、またはユーザーのキーボードの設定に従って設定できる InsertKeyMode 列挙によって定義されます。 このプロパティは、キーボードの挿入モードよりも優先されます。 たとえば、キーボードが上書きに設定されていても、 InsertKeyMode が Insertに設定されている場合、 MaskedTextBox は挿入モードで動作します。 IsOverwriteMode プロパティは、MaskedTextBoxの真の挿入モードにアクセスします。

InsertKeyMode変更によってIsOverwriteModeの値が変更された場合、MaskedTextBoxはIsOverwriteModeChanged イベントを発生させます。

マスクが設定されていない場合、このプロパティは無効です。

適用対象

こちらもご覧ください