INPUTMASK for phone numbers

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 3167
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

INPUTMASK for phone numbers

Post 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
There's nothing you can do that can't be done...
User avatar
mol
Posts: 3723
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: INPUTMASK for phone numbers

Post 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
User avatar
serge_girard
Posts: 3167
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: INPUTMASK for phone numbers

Post 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!
There's nothing you can do that can't be done...
Post Reply