G
Guest
Hi,
The problem is laughably simple: I have a text box which must accept only
numbers (on aim to restrict some extremely "talented" users to write, for
example "blahblahblah" instead of 234); In C++ that is not a problem. As soon
as you link some variable with dialog item, for example link a text box with
some integer, the compiler restricts user to enter any char in above box,
except numeric. in more subtle cases, one may use IsAlpha, IsAlnim and other
functions to make decision.
I am new to C# and still can not find the easy way. The only way I managed
to find, is to override OnKeyDown function, check character by myself and
allow only right ones.
Can anybody tell an easier way?
The problem is laughably simple: I have a text box which must accept only
numbers (on aim to restrict some extremely "talented" users to write, for
example "blahblahblah" instead of 234); In C++ that is not a problem. As soon
as you link some variable with dialog item, for example link a text box with
some integer, the compiler restricts user to enter any char in above box,
except numeric. in more subtle cases, one may use IsAlpha, IsAlnim and other
functions to make decision.
I am new to C# and still can not find the easy way. The only way I managed
to find, is to override OnKeyDown function, check character by myself and
allow only right ones.
Can anybody tell an easier way?