Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text Box forgets lenght until focused?
Message
From
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:
00737636
Views:
22
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform