I tried to prevent user to enter non-numeric characters in numeric textbox and put this code in TextBox_KeyPress method:
IF !Char.IsDigit(e.KeyChar) .AND. e.KeyChar != '.'
e.Handled := TRUE
ENDIF
IF e.KeyChar == ','
e.Handled := TRUE
ENDIF
and I got this error message:
error XS0019: Operator '!=' cannot be applied to operands of type 'char' and 'string'
error XS0019: Operator '==' cannot be applied to operands of type 'char' and 'string'
What is right operand?
Zeljko
error XS0019
Re: error XS0019
Depends which Dialect you are using. If "VO", '.' is read as another syntax of "." - hence the error. IIRC, you could denote the type like c'.'
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Re: error XS0019
It works. Thank you Karl.
Zeljko
Zeljko

