INPUTMASK for phone numbers

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 2636
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 911 times
Been thanked: 166 times
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

User avatar
mol
Posts: 3436
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 279 times
Been thanked: 177 times
Contact:

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: 2636
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 911 times
Been thanked: 166 times
Contact:

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!

Post Reply