I need a masked text input to handle hexadecimal characters, of required length 6.
For example: 334CFA, 1CA039 or CA377F.
However, I have two requirements:
- User should be able to enter both lowercase and uppercase letters A-F
- The control would display only uppercase letters, even when a lowercase letter is entered.
So, user should be able to enter 15cfaD (written without shift/capslock), and the control should display: 15CFAD. The control should never display lowercase letters, but it should allow them to be input, automatically converting them to uppercase.
I've tried with a custom token, but I was only able to limit the input to 0-9A-Fa-f. This of course does not make the control display lowercase letters as uppercase.
I've tried using uppercase modifier (>) with my custom token X (Mask = ">X>X>X>X>X>X"), but it did not modify the token, it simply inserted the > characters into the input.
Is there any way to implement a custom token with TokenType.Modifier that would change the token with an arbitrary function?
How can I achieve the scenario described?
For example: 334CFA, 1CA039 or CA377F.
However, I have two requirements:
- User should be able to enter both lowercase and uppercase letters A-F
- The control would display only uppercase letters, even when a lowercase letter is entered.
So, user should be able to enter 15cfaD (written without shift/capslock), and the control should display: 15CFAD. The control should never display lowercase letters, but it should allow them to be input, automatically converting them to uppercase.
I've tried with a custom token, but I was only able to limit the input to 0-9A-Fa-f. This of course does not make the control display lowercase letters as uppercase.
I've tried using uppercase modifier (>) with my custom token X (Mask = ">X>X>X>X>X>X"), but it did not modify the token, it simply inserted the > characters into the input.
Is there any way to implement a custom token with TokenType.Modifier that would change the token with an arbitrary function?
How can I achieve the scenario described?