Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checkbox caption
Message
De
11/06/2008 00:19:54
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
10/06/2008 16:48:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01322765
Message ID:
01323004
Vues:
24
Hi Cetin,

to point 1

How do you know if it fits?, anyway, Font* is not subject to change.

to point 2
MAXLEN depends on the characters used. (iiii <> mmmm) (IOW: I know MaxLen in Pixels, not in chars)
I know how to calculate the lenght of a string, but this would mean to do a backward loop until it fits (what I try to avoid)

Agnes
>>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
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform