Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enter key zeros out edit change to textbox
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00935276
Message ID:
00935330
Views:
20
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform