MaskedTextBox and Money fields RRS feed

  • Question


    I am using a MaskedTextBox to enter a money value ie

    ft1.Mask = "#####.##";



    Is there anyway of keeping all the chars to the left of the decimal point until a decimal point is actually pressed?

    The cursor "jumps" the decimal point when it reaches it, regardless of what you are typing, and it doesn't feel very intuititive ot me.

    Friday, December 14, 2007 4:14 PM


All replies

  • OK. Let me try a different tack:



    I find the DecimalTextBox does exactly what I need;

    Is there any restriction on using this in my applications?

    Friday, December 14, 2007 5:20 PM
  • Hi Ziggy,


    Since the DecimalTextBox is available on Microsoft download web site, there should be no restriction on using it in your applications.

    Monday, December 17, 2007 10:12 AM
  • Doesn't work if the cursor is to the right of the decimal.
    Start up
    Enter 23.45 in the DecimalTextBox
    Cursor to before left most number (2).
    Hit the delete key until all numbers = 0 and cursor is positioned to right of decimal
    Type 23.45 again
    Only the .45 will show.

    It appears not to recognize the decimal.

    Also, try selecting the entire number as if you wanted to copy it.  The control won't let you select the entire number.

    VS 2008 sp1

    Thursday, November 12, 2009 5:33 PM