On Sunday 01 October 2017 12:49:07 fredvs wrote:
> Hello Martin.
> How to assign font color to children only ?
> If there are multiple forms, doing this change the parent color of all
> other forms:
> one_of_the_forms.font.color := cl_red;
Activate a local font instance either by clicking the ellipse button in "font"
row in objectinspector at design time or by calling twidget.createfont() at
On Monday 02 October 2017 16:02:45 fredvs wrote:
> > Activate a local font instance either by clicking the ellipse button in
> Huh, of course I did it, but there is still a problem .
> But like explained in previous thread: one_of_the_forms.font.color :=
> cl_red ---> all other child widgets,
Aha, yes, all <parent> fonts of children use the next activated font upwards
in the widget hierarchy.
> even from other forms become red-font.
That is wrong. Do you have a reproducible testcase? Are you sure you did not
change a <parent> font color by accident?
form2fo.font is a <parent> font. Because form2fo has no parent you actually
change the font msestockobjects.stockobjects.fonts[stf_default] which is the
Please activate a local font-instance in form2fo by clicking on the ellipse
button in row "font" in object inspector or call "tform2fo.createfont()" at
runtime before setting the font properties.
procedure tmainfo.changecolor(const sender: TObject);
form2fo.font.color := cl_red;