Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Standards for making a long folder path fit into a textb
Message
 
To
15/05/2000 14:42:30
James Marshall
SPAWAR Systems Center Charleston NCR
Washington, District of Columbia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00369733
Message ID:
00369820
Views:
18
I vote for a mix of solution 1,2,3.
Save the path in a property of the form ex: Thsiform.MyPath
Display the "\...\" when the path is to long in the value property of the textbox.
Use the GotFocus() of the textbox to replace the property TextBox.value with Thisform.MyPath.
Use the Valid() event to save the change made to the textBox back in Thisform.MyPath.
Use the LostFocus() to set back the Display path in the value property.

>FOXPRO 101:
>1. In shortening a fullpath, is it standard to replace a middle section with "\...\"?
>(i.e., c:\program files\subone\subtwo with c:\...\subone\subtwo )
>
>2. In shortening a fullpath, is it standard to replace the sections starting with the leftmost "\"?
>( i.e., as before, c:\...subone\subtwo rather than c:\program files\...\subtwo )
>
>3. Is it best to set such a textbox as unselectable, but viewable (i.e., WHEN method returns .F., Backstyle = 0 - Transparent)?
>If I allow the user to directly enter the path themselves, won't they be tempted to enter their own \...\s (which I would have to explain in a VALID clause why they can't but my program can) ?
>
>4. Is it better to user a label instead of a textbox, when echoing such information back to the user?
>
>5. When using a proportional font, is there a cleaner way of determining the length of the variable inside the textbox, other than using the form's .TEXTWIDTH(cString) property, and comparing it against the length of the textbox? (This way gave me fits on my dynamically resizeable forms, until I stored off the original width of the textbox, rather than the resized width; this because .TEXTWIDTH(cString) doesn't resize. Doh!)
>
>Thanks in advance, all. I'd hate to appear on the "Interfaces from Hell" page!
>
>Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform