Re: Re: can I change the default attributes so I can set"global attributes"
roger tunnicliffe
Oct 01, 2022
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. ?
Thanks in advance.
Cheers
Roger
On Saturday, October 1, 2022 at 10:12:27 PM UTC+10 Ian MacArthur wrote:
On 1 Oct 2022, at 13:07, Albrecht Schlosser wrote:
>
> On 10/1/22 12:38 Ian MacArthur wrote:
>> I suppose it wouldn’t be that tricky to write a loop that would take a window pointer, loop through all it’s children and set the face / size for each?
>
> Probably not possible w/o RTTI since not all widgets support all text/font related settings in the same way. The basics like textsize() and labelsize() would certainly work (i.e. all methods that are defined in Fl_Widget) but I doubt that this would be enough.
Yeah, fair enough.
I was really only thinking about the properties inherited from Fl_Widget, but there may well be others you’d want to set “globally” per-window and that could get complicated really fast...
The basics, like font settings, might still be “trivial” though.
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'.