[MSEide-MSEgui-talk] Parent font.color ?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[MSEide-MSEgui-talk] Parent font.color ?

fredvs
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;

Idem if there is many groupboxes, assigning a font color to one groupbox -->
all other groupboxes change the color of the child.

Thanks.

Fre;D




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Parent font.color ?

mse
Administrator
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
runtime.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Parent font.color ?

fredvs
> Activate a local font instance either by clicking the ellipse button in
"font"

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, even from other forms become red-font.

But Martin, please forget this, I did manually change each widget-font color
(but not of a form) and I get what I want .

Thanks

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Parent font.color ?

mse
Administrator
On Monday 02 October 2017 16:02:45 fredvs wrote:
> > Activate a local font instance either by clicking the ellipse button in
>
> "font"
>
> 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?

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Parent font.color ?

fredvs
> That is wrong. Do you have a reproducible testcase?

I will try and if ok, I will give a demo.

> Are you sure you did not change a <parent> font color by accident?

Maybe.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Parent font.color ?

fredvs
In reply to this post by mse
> Do you have a reproducible testcase?

See demo in attachement.

msefontcolor.zip
<http://mseide-msegui-talk.13964.n8.nabble.com/file/t2/msefontcolor.zip>  

> Are you sure you did not change a <parent> font color by accident?

Yes.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Parent font.color ?

mse
Administrator
On Tuesday 03 October 2017 00:39:05 fredvs wrote:

> > Do you have a reproducible testcase?
>
> See demo in attachement.
>
> msefontcolor.zip
> <http://mseide-msegui-talk.13964.n8.nabble.com/file/t2/msefontcolor.zip>
>
> > Are you sure you did not change a <parent> font color by accident?
>
> Yes.
>
form2fo.font is a <parent> font. Because form2fo has no parent you actually
change the font msestockobjects.stockobjects.fonts[stf_default] which is the
default font.
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);
begin
 form2fo.createfont();
 form2fo.font.color := cl_red;
end;
"

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

fontcolor.png (96K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Parent font.color ?

fredvs
Hello Martin.

OK, thanks.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk