Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing default cursor position when textbox gets focus
Message
De
26/02/1999 15:31:44
 
 
À
26/02/1999 15:22:58
Chris Crachiolo
Blackmoor Associates Incorporated
New York City, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00192131
Message ID:
00192136
Vues:
34
Hi Chris ----

Look in the Files section here. I believe that Jim Booth has contributed a textbox class to alleviate this.


>VFP 5.0a: Is there any way to change the default cursor position when the user tabs into a text box control?
>
>I've got a bound text box control that accepts a numeric value. I want it to display the number with commas, so I set the InputMask to "999,999,999" which works fine, except that when the form runs and a new record is being added, the controls displays a zero at the rightmost position when the user starts typing (at the default cursor position, which is in the middle), and unless extra effort is made, it becomes part of the number. For example, if the user simply enters "22" it becomes "220" unless the zero is deleted. The only easy way I can see to avoid this is to omit the InputMask, but then I lose my commas.
>
>Is there a way around this, other than creating a text-box subclass and writing code to eliminate the input mask and then restoring it after the entry is complete? I would rather avoid this, since I would then be unable to drag-and-drop from the data enviroment in these cases (I think).
>I suppose I could also force the cursor into the desired position by stuffing the keyboard buffer, but this is also something I want to avoid.
>
>Thanks in advance.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform