Steve,
I have run into a curious thing. I have a form on which I want to
change the color of a label or an edit box component at run-time. When I
write the code that the online help says will do that:
Form3.Label1.Color := clGreen;
and try to compile it, the system seems not to understand what "clGreen" is.
It refers to it as an "unknown identifier". Now if that were one of *my*
defined constants, it would mean that either I forgot to define it or I had
not included the unit where its definition was given. Is it defined in some
unit not automatically included by Delphi?
On the actual form in question, I have set ParentColor to "FALSE" and
changed the color manually there in the Object Inspector, and it works when I
point-n-shoot at the color clGreen in the list of available colors.
My code designed to change the color is in a global unit and is
referenced in the Unit3 "uses..." section.
When I change the code to:
Form3.Label1.Color := 3;
it compiles, but the label's color becomes a solid black instead of some
desired color when the program is run.
What am I missing? (I am using the 16-bit Delphi which came along with
Delphi 2. I think it is version 1.02.)
Thanks in advance,
Justin
--- OPMED 3.20wb
---------------
* Origin: The Home Point (1:106/100.1)
|