| GrapeCity.Win.Editors.v80 アセンブリ > GrapeCity.Win.Editors 名前空間 > GcCharMask クラス : Format プロパティ |
以下のキーワードを組み合わせた文字列を指定します。全角文字が指定された場合は全角文字が、半角文字が指定された場合は 半角文字がそれぞれ入力可能な文字種として指定されます。
| 全角 | 半角 | 説明 |
|---|---|---|
| A | A | 大文字のアルファベット(A〜Z) |
| a | a | 小文字のアルファベット(a〜z) |
| K | K | カタカナ(促音・拗音の小書き表記あり) |
| N | N | カタカナ(促音・拗音の小書き表記なし) |
| 9 | 9 | 数字(0〜9) |
| # | # | 数字および数字関連記号(0〜9、+ - $ % \ , .) |
| @ | @ | 記号 |
| B | B | 2進数(0または1) |
| X | X | 16進数(0〜9、A〜F、a-f) |
| S | S | 空白文字 |
| J | - | ひらがな(促音・拗音の小書き表記あり) |
| G | - | ひらがな(促音・拗音の小書き表記なし) |
| Z | - | すべての全角文字 |
| T | - | サロゲート ペア文字 |
| D | - | 2バイト文字(サロゲート ペア文字を除いた全角文字) |
| I | - | JIS X 0208文字で構成された文字 |
| M | - | Shift JIS文字で構成された文字 |
| - | H | すべての半角文字 |
| - | ^ | 指定した書式に含まれないすべての文字 |
| - | \ | エスケープ・シーケンス |
// Please use the following namespace // using System.Windows.Forms; // using GrapeCity.Win.Editors; public void InitializeGcCharMask() { // Create an instance of a GcCharMask control. GcCharMask gcCharMask1 = new GcCharMask(); // Allow the GcCharMask control to accept upper case alphabet(A-Z) and SBCS space. gcCharMask1.Format = "AS"; // The GcCharMask control will not auto-convert invalid char to valid char. gcCharMask1.AutoConvert = false; // Create an instance of a GcCharMask control. GcCharMask gcCharMask12 = new GcCharMask(); // Accept upper and lower case alphabet, as well as the symbols. Except '#', '@' and '*' chars. gcCharMask12.Format = @"aA@^\#\@*"; // The GcCharMask will try to convert the invalid char to valid char automatically. gcCharMask12.AutoConvert = true; }
' Please use the following namespace ' Imports System.Windows.Forms; ' Imports GrapeCity.Win.Editors; Public Sub InitializeGcCharMask() ' Create an instance of a GcCharMask control. Dim gcCharMask1 As New GcCharMask() ' Allow the GcCharMask control to accept upper case alphabet(A-Z) and SBCS space. gcCharMask1.Format = "AS" ' The GcCharMask control will not auto-convert invalid char to valid char. gcCharMask1.AutoConvert = False ' Create an instance of a GcCharMask control. Dim gcCharMask12 As New GcCharMask() ' Accept upper and lower case alphabet, as well as the symbols. Except '#', '@' and '*' chars. gcCharMask12.Format = "aA@^\#\@*" ' The GcCharMask will try to convert the invalid char to valid char automatically. gcCharMask12.AutoConvert = True End Sub