Subject Re: Numeric Entry in a Grid
Author mmenaz
--- In IBObjects@y..., "Bob" <rcmiszuk@y...> wrote:
> This is probably an easy question.

Yes, it's easy.. you can't!
I had to develop a custom control for currency editing (IB_Currency in IBO palette) since standard mask editing does not work for that porpouse.
Jason has wrote in his site that that control can be embedded in grids. I tryed once, but I did not succeed. Hope that if true is beause of the code of the class it inherits from, since I've put no code to make it "embeddable" (not lazy, just I don't know how!).
Maybe you could try Geoff Ehn controls (see IBO page, or http://www.telesiscomputing.com.au/enhcomp.htm) that are very strong in powerful edit mask support, so tehy could be good and embeddable (I don't know... Geoff?).
Regards
Marco Menardi

> I have a column in a grid that allows the
> user to enter numbers, and while they're entering I want to show and allow
> them to enter two decimal places.
>
> I have played with edit masks and am close to what I want with a mask of
> 99.99;1;0. It fails when the user types "1.23" by returning "1 23". If I
> change the mask to 99.99;0;0 I can make "1.23" (user doesn't type the
> decimal) turn into "123.00" which is also not correct. Also mask of
> "99.99;1; " turns "1.22" into "1 .22".
>
> I could go on, but you get my point -- that is, I'm stuck. I think I'm just
> missing something simple here. I want the user to be able to enter two
> digits to the left of the decimal, and two to the right, and show them two
> digits (zeros) to the right while they are entering.
>
> Thanks for your help.
>
> Bob.