Link to home
Start Free TrialLog in
Avatar of b3cf
b3cf

asked on

Mask Edit

Hi
  How could I use the mask edit to have the following input format.

  + or - 999.999999

ex          +156.894677
              -34.222

Any help is greatly appreciated.

Thanx

Dylan
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

I don't think that the Masked Edit Control has that level of flexibility.  However, you can write code in the KeyPress Event of a standard text box that could accomplish the same thing (that is, only allow a "+" or "-" as the first entry, and then only allow digits or a decimal point (only one) after the first KeyStroke.

Avatar of Dave_Greene
Dave_Greene

Put this in the format property

+#,###,###.########;-#,###,###.########
This has the format of 3.6 as you wanted

+###.######;-###.######
Avatar of b3cf

ASKER

Hi Dave
  It didnt work, I need the mask.
Avatar of b3cf

ASKER

Hi Dave
  It didnt work, I need the mask.
Avatar of b3cf

ASKER

Hi Dave
  It didnt work, I need the mask.
ASKER CERTIFIED SOLUTION
Avatar of Dave_Greene
Dave_Greene

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dave Greene

After Setting
Mask = &###.######

Thne you can time any charecter like a,b,c,......


Sanjeev
set mask property to -999.999999
ignore my previous posting

use mask as 9###.######

but this accepts digit value at the 1 st digit place where mask is 9. need to write code to suppress that in keypress if first digit is other than +/- then make keyascii=0

Avatar of b3cf

ASKER

Thanx Dave. Thanx everybody else who contributed.

Dylan
Avatar of b3cf

ASKER

Thanx Dave. Thanx everybody else who contributed.

Dylan