Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enter key zeros out edit change to textbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00935276
Message ID:
00935330
Vues:
22
This message has been marked as the solution to the initial question of the thread.
Hi Terry,

It looks like a bug to me and it still exists in VFP9beta. You can bind textbox to a property to workar ound it.
DEFINE CLASS clsTextBox as TextBox
width=100
format="Z"
inputmask="9999999.99"
left=100
visible=.t.
*value=0
nTxtValue = 0
ControlSource = "This.nTxtValue"
ENDDEFINE 
BTW, it's help omission/error that 'Z' format isn't listed for textbox.

>* I have noticed {ENTER} behavior that just don't seem right! The
>* attached form has two text boxes. Using tab to navigate at first,
>* Change the value in the top text box and press {Enter}. Back tab
>* to the text, and press enter. Note the value changes to 0. Now,
>* backtab, change to a non zero value and [forward] tab. Back and
>* forward tab again. The value DOES NOT change to zero.
>
>* Note: VFP 8 Help does not list the "Z" format option for
>* textboxes. Spinners do have "Z". I use it in textboxes anyway
>* and it works. Even with "Z", {Enter), after changing the value
>* will still zero it out
>
>* Is this "expected behavior"? Is there a way to avoid it?
>
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform