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
TD>numerical like 8388608, then it does read it just fine and changes the
TD>label.font.color to whatever the number represents. Why???
Tony -
My guess is that you are saving a string in your initialization file and
NOT the numeric value that is used to represent. the terms clBlack,
clAqua, and others are part of an enumerated data set defined by
Borland, where each literal is somewhere equated to a long integer; You
really want to save the long integers out to the initialization file,
and not the strings. Or, if you want the term clAqua to be written,
you'll have to use a series of if-then-else statements to convert the
clAqua into its equivalent string
if inifilecolor = 'clAqua' then Label1.font.color := clAqua;
I hope that this provides you with some insight.
-- Jerry
---
* OLXWin 1.00b * Press any key to continue or any other key to quit
--- InterEcho 1.19
---------------
* Origin: PC-Ohio PCBoard * Cleveland, OH * 216-381-3320 (1:157/200)
|