Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug: Number of characters in varchar textbox
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Bug: Number of characters in varchar textbox
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01012350
Message ID:
01012350
Views:
56
I don't know if you will agree. I'd regard the following behavior as a bug for binding a varchar field to a textbox, no matter in a form (affected by the textbox width) or a grid/browse (affected by the column width).

Run the following code and see how many "i" characters you can enter into each textbox. The maximum number of "i" characters I can enter are (default font Arial,9):
11 in the 1st textbox (bug)
16 in the 2nd textbox (correct)
16 in the 3rd textbox (correct)
21 in the 4th textbox (bug)

When you resize the form, you will find that the numbers will change (1st and 4th textboxes).
Create Cursor T (F1 v(16), F2 c(16), F3 v(16), F4 v(16))
Append Blank
o=Createobject('TestForm')
o.Show(1)

Define Class TestForm as Form
	Add Object txt1 As Textbox With ControlSource='F1', Anchor=10, Width=70
	Add Object txt4 As Textbox With ControlSource='F2', Anchor=10, Width=70, Top=30
	Add Object txt2 As Textbox With ControlSource='F3', Anchor=10, Width=70, Top=60, Maxlength=16
	Add Object txt3 As Textbox With ControlSource='F4', Anchor=10, Width=120, Top=90
EndDefine
Ben
Next
Reply
Map
View

Click here to load this message in the networking platform