Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
How do I set a mask on a masked edit control so I can press "-" first to get a negative number
posted

Hi

What mask or combination of mask and code will allow me to get a negative number by pressing "-" first.

e.g. you have to type "3" then "-" to get -3, as opposed to typing "-" and then "3"

the mask we are trying is

"{LOC}-nnn,nnn,nnn,nnn"

thanks

Michael

  • 469350
    Offline posted

    Hi Michael,

    If your mask is "{LOC}-nnn,nnn,nnn,nnn", then you can type "-3" to get a value of negative 3. If that's not working for you, then something is wrong. My best guess is that you are handling an event of the control that is interfering with the processing of the keystrokes.

    This could be a bug, of course, but if so, it must be a bug in a pretty obscure and rarely-used version of the controls, since that would obviously be a pretty glaring bug and lots of people would have noticed it.

    What version of the controls are you using? Do you have the latest service release?

    How to get the latest service release - Infragistics Community