Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you change color in middle of caption or text?
Message
De
12/10/2001 02:22:44
 
 
À
12/10/2001 01:41:22
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00567417
Message ID:
00567421
Vues:
13
>Is there a way to change the color of a few numbers in the middle of a line of text and/or used as a caption?
>
>Example
>
>Print 15 Labels
>
>Have the Print & Labels as normal black, have the 15 as red to stand out.

I see two ways of doing this:

a) use a RTF control;

b) break the label in parts and reposition the third as the second grows or shrinks
label2.left = label1.left+label1.width+nSpacingConstant && might be retrieved from txtwidth(" ",label1.fontname,label1.fontsize)
label2.autosize = .t.
label3.left = label2.left+label2.width+nSpacingConstant && ditto
when label2.caption changes, label3.left should be recalculated

font names, sizes and styles and text colours could be set at design time, in the property sheets, or could even be set at run-time depending on the caption contents


bye
----------------------------------
António Tavares Lopes
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform