Base class for all text box controls which can gather text input from the user.
| 15 | /// Base class for all text box controls which can gather text input from the user. |
| 16 | /// </summary> |
| 17 | public abstract class TextBoxBase : ContainerControl |
| 18 | { |
| 19 | /// <summary> |
| 20 | /// The delete control character (used for text filtering). |
| 21 | /// </summary> |
| 22 | protected const char DelChar = (char)0x7F; |
| 23 | |
| 24 | /// <summary> |
| 25 | /// The text separators (used for words skipping). |
| 26 | /// </summary> |
| 27 | protected static readonly char[] Separators = |
| 28 | { |
| 29 | ' ', |
| 30 | '.', |
| 31 | ',', |
| 32 | '\t', |
| 33 | '\r', |
| 34 | '\n', |
| 35 | ':', |
| 36 | ';', |
| 37 | '\'', |
| 38 | '\"', |
| 39 | ')', |
| 40 | '(', |
| 41 | '/', |
| 42 | '\\', |
| 43 | '>', |
| 44 | '<', |
| 45 | '=', |
| 46 | }; |
| 47 | |
| 48 | /// <summary> |
| 49 | /// The allowable characters to use for the text. |
| 50 | /// </summary> |
| 51 | [Flags] |
| 52 | public enum AllowableCharacters |
| 53 | { |
| 54 | /// <summary> |
| 55 | /// Wether to not allow any character in the text. |
| 56 | /// </summary> |
| 57 | None = 0, |
| 58 | |
| 59 | /// <summary> |
| 60 | /// Whether to use letters in the text. |
| 61 | /// </summary> |
| 62 | Letters = 1 << 0, |
| 63 | |
| 64 | /// <summary> |
| 65 | /// Whether to use numbers in the text. |
| 66 | /// </summary> |
| 67 | Numbers = 1 << 1, |
| 68 | |
| 69 | /// <summary> |
| 70 | /// Whether to use symbols in the text. |
| 71 | /// </summary> |
| 72 | Symbols = 1 << 2, |
| 73 | |
| 74 | /// <summary> |