Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text Box forgets lenght until focused?
Message
 
To
03/01/2003 07:14:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00737541
Message ID:
00737762
Views:
14
>>I haven not check this in VFP 6.
>>I have a textbox:
>>Format=R
>>InputMask=!!!!!!!!!!!!!!!!!!!! && 24
>>MaxLength=24
>>Value=(None)
>>
>>I placed a click in the box(es) that:
>>MESSAGEBOX(transform(len(this.value)))
>>
>>When I click the box, sometimes it says length is 0, and at others, it says 24. The box is cleared with a null (""). The only way the box will consistently report a length of 24 is when it is cleared with SPACE(24) or a space(1) [or when the first character of the entry is made]. I can live with this, but am hoping that there might be a way assure the empty box reports its specified length without pushing data into it.
>>
>>PS: Access to the box is controlled by a when method that requires earlier boxes to be populated with data.
>>
>>Any come-backs appreciated!
>>Terry
>
>Terry,
>You could put ! to format instead of 24 ! in inputmask. Format = "R!"
>
>this.SelLength = 9999
>MESSAGEBOX(transform(this.SelLength))
>
This would count extra formatting chars if exists (ie: 99-999 would count as 6 instead of 5, you might want to check inputmask too).
>
>PS: VFP7 and later doesn't need transform() for messagebox().
>Cetin

Thanks for the update on VFP 7:). I worked the R! in the format as well. It still isn't consistent in reporting the length (maxlength was set to the desired length). It almost as if a MINLENGTH propert is required.

I worked around by assigning SPACE(nn) to the value. That will do for a while! Thanks
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform