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)
|