My problem is as follows.
I have a decimal column on a DW. I to prevent the user from entering invalid
characters like abc etc.
I know I can do this using the editchange event. But when the the user
enters 1.a I want to ommit the 'a' only 1. should remain in the edit field.
I want to implement this on my ancestor object. As such I'd prefer not to
use edit masks.
Any help would be greatly appreciated.
Kindest regards,
Arnoud
In pbm_dwnkey you'll write smth like:
blob{28} lblb_msg
integer lpdot
string lscurrt
boolean lb_remove
CHOOSE CASE key
CASE Key1!, Key2!, Key3!, Key4!, Key5!, Key6!, Key7!, Key8!, Key9!,
Key0!, KeyBack!, &
KeyDelete!, keyleftarrow!, keyrightarrow!, keynumpad0!,
keynumpad1!, keynumpad2!, keynumpad3!, &
keynumpad4!,keynumpad5!,keynumpad6!,keynumpad7!,keynumpad8!,keynumpad9!
CASE keyperiod!
lscurrt = GetText()
lpdot = Pos(lscurrt, ".")
IF lpdot > 1 THEN
lpdot = Pos(lscurrt, ".", lpdot)
lb_remove = lpdot > 0
END IF
CASE ELSE
lb_remove = TRUE
END CHOOSE
IF lb_remove THEN PeekMessageA(lblb_msg,0,256,264,1)
RETURN 0
Obviously above has a very crude method of parcing for a decimal separator,
you'll have to come up with something production ready.
pbm_thisusuallydoesnothelp:-))
Philip Salgannik
"Arnoud Oortwijk" <arnoud oortwijk> wrote in message
news:408e3446@forums-1-dub...