Page 1 of 1

INPUTMASK for phone numbers

Posted: Fri Oct 09, 2020 1:35 pm
by serge_girard
Anybody has at good working TEXTBOX for phone numbers with INPUTMASK

Can't get this working:

Code: Select all

@ nROW,nCOL TEXTBOX T_PHONE	OF Form_1		;
   WIDTH 120		;
   VALUE cPHONE	;
   TOOLTIP 'Phone number';
   INPUTMASK '(999) 9999-9999';
   BACKCOLOR SILVER	;
   FONTCOLOR BLUE BOLD ;
   ON GOTFOCUS  {Form_1.T_PHONE.BackColor := WHITE };
   ON LOSTFOCUS {Form_1.T_PHONE.BackColor := SILVER};
   ON ENTER		  Form_1.T_PHONE2.SetFocus   // next input field

Serge

Re: INPUTMASK for phone numbers

Posted: Fri Oct 09, 2020 3:57 pm
by mol
Generally TEXTBOX with INPUTMASK is not working perfect.
Many of my clients have a problem with it,, especially when they enter to textbox with mouse (which hapens in 99% cases).

I can't help you

Re: INPUTMASK for phone numbers

Posted: Fri Oct 09, 2020 4:19 pm
by serge_girard
Yes, I know...

I replace INPUTMASK ... AFTER FONTCOLOR .... then no compile error but hard to use.

Now rewrote it to normal TEXTBOX with MAXLENGTH 15 and inputcontrole afterwards: PERFECT....!

Thanks Marek!