Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox caption
Message
From
10/06/2008 16:48:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/06/2008 05:36:32
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01322765
Message ID:
01322927
Views:
20
>Cetin,
>
>my failure.
>
>What I mean was Trim as the report does, like trim to the nearest word or adding eclipsis.
>
>Agnes
>>>Hi All,
>>>
>>>I have a problem with captions on a check box (or with anything with a caption)
>>>
>>>The object is off fixed length (Autosize=.f., WordWrap=.F.), but the caption may be altered by user input (user may change field captions). Now sometimes the caption is to long. I would like to do something like clipping as the report does. For now I see nothing then running backwards through the string until it fits (via TXTWIDTH) , but that feels so clumsy.
>>>
>>>Any better ideas?
>>>
>>>Agnes
>>
>>If autosize = .f. it does the clipping by default, no?
>>Cetin

I see. I do 2 things:
1) Calculate the width and decrease fontsize till it fits.
2) Trim adding ...:
if len(m.lcString) > MAXLEN
   lcString = left(m.lcString, MAXLEN-3) + '...'
endif
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