Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
I wanna use MaskedTextBox to achive some function.

I set MaskedTextBox.Mask = @"\X##########\Y##########\Z##########",so i key press '123',the compenent can support,then i key press . it prevent me to key press down.
i just wanna the MasketTextBox can suppose float type,and the format can't limit the . position except X,Y,Z .

please do not use textbox,thanks for answer.

--------------------------------------------------------
improve my quetion:
x y z means x axis,y axis, z axis(it's step motor);i set the value in MasketTextBox as below:
X234.1 Y23.123 Z457.928357
so the step motor will reach the value position.
Posted
Updated 29-Jan-15 19:23pm
v2
Comments
[no name] 30-Jan-15 0:12am    
Your requirement is not clear...
xuyunhai 30-Jan-15 1:24am    
i improved my question,thanks for answer.

1 solution

The MaskedTextBox control isn't clever enough for your needs unfortunately.

Try the solutions MaskedTextBox mask for decimal, real, float ?[^]

Masked C# TextBox Control[^]

http://stackoverflow.com/questions/14432659/masked-textbox-with-decimal-numbers[^] (the one from Zarathos)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900