Re: Re: can I change the default attributes so I can set"global attributes"
Albrecht Schlosser
Oct 01, 2022
On 10/1/22 14:29 roger tunnicliffe wrote:
My apologies, I am new to Fltk.
What I meant was....
I have a project/system/executable (whatever you want to call it) and
it might comprise of 2 or windows and lots of widgets.
Instead of having to set - say the fontsize (or color or any other
attribute) - individually I want to be able to say "make all font
sizes 11".
I know that they seem to default to 14 (correct me if i am wrong) so
there must be some way to do it.
Does that make it any clearer. ?
Yes, Roger, it does. But this (setting the widget font sizes globally)
has been explained by Manolo in his reply from Sep 30 together with a
lot of other global initializations:
"All widgets use this font size for their text
Fl_Fontsize FL_NORMAL_SIZE = 14;
you can change the value of this public global variable."
In short: you just need to assign
`FL_NORMAL_SIZE = 11;`
at the beginning of your program, i.e. before all widgets are created.
Note: despite the capital letters this is not a macro, it's a global
variable.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.