TIP: Click on subject to list as thread! ANSI
echo: delphi
to: TONY DUNN
from: GARY WEINFURTHER
date: 1997-07-08 15:13:00
subject: Values for colors

Tony Dunn mentioned this to All:
 TD> If the color definition in the INI file is a defined constant like 
clAqua,
 TD> so I would have a line in Veejo.INI like...
 TD> [LabelFont]
 TD> LabelFontColor=clAqua
 TD> ...then a line like:
 TD> Label1.font.color := VeejoIni.ReadInteger('LabelFont', 'LabelFontColor',
 TD> clBlack);
 TD> in my code for FormActivate does not read it, but uses the default, in 
the
 TD> above case, clBlack. If the value in the INI file for LabelFontColor is
 TD> actually numerical like 8388608, then it does read it just fine and
 TD> changes the label.font.color to whatever the number represents. Why???
Because you called ReadInteger, which does exactly that.  If you use 
ReadString, you'll get back a string containing 'clAqua', which you will than 
have to convert to a color value.  Look up the StrToColor (or is it 
StringToColor?  I forget.) function.
                                ...Gary
--- GoldED 2.41
---------------
* Origin: The Flying Circus BBS, Farmington Hills, MI. (1:2410/905)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.