Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing font
Message
De
26/11/2014 15:43:46
 
 
À
25/11/2014 16:52:06
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01611319
Message ID:
01611474
Vues:
82
>>Hi tamar
>>It's a popup menu item - I wanted to start one of the bar items with a symbol.
>>yes it is old approach and I have upgraded many of the popups and converted to many of the different ones offered on this site - most commonly 'form'.
>>but still find the old popup easiest to create and integrate.
>>
>>k
>>
>>>>Each of these work independently
>>>>
>>>>? 'Part one'  font 'arial',16 
>>>>??'  Part two' font 'arial',16 style 'I'
>>>>
>>>>
>>>>- however is there any way I can change font on a ONE command line
>>>>
>>>>
>>>>? 'Part one'  font 'arial',16 + '  Part two' style 'I' 
>>>>
>
>Here... you may not like it, but it works. Create a little setfont.prg and keep it in your path:
>
LPARAMETERS lcName, lnSize, lcStyle
>*[2014/11/25 22:49] nDragan - the quick and dirty way to switch font in the middle of something.
>* dirty, as screen font properties aren't reset.
>
>IF !empty(lcName)
>	_screen.FontName=lcName
>ENDIF
>
>IF !empty(lnSize)
>	_screen.FontSize=lnSize
>ENDIF
>
>lcStyle=upper(evl(lcStyle, ""))
>
>_screen.FontBold="B"$lcstyle
>
>_screen.FontItalic="I"$lcStyle
>
>RETURN ""
>
>Then your command becomes
>
?setfont("Georgia",12, "")+"Part one", setfont("Tahoma",16, "I")+" Part two."
Ugh. I can see potential where you might not get what you'd expect, depending on how the ?/?? command is processed. Reminds me of the headaches back in the DOS xBASE days -- dealing with SET COLOR TO statements in code executed in ON KEY or event-triggered code (things got really fun if you had code triggered through a timer -- which was possible under WordTech's Quicksilver product -- such code tended to be flaky enough that it was best avoided)...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform