Re: Re: can I change the default attributes so I can set"global attributes"
Manolo
Oct 01, 2022
Le samedi 1 octobre 2022 à 02:45:54 UTC+2, roger a écrit :
roger tunnicliffe
8:25 AM (2 hours ago)
to fltk.general
Still not quite sure here.
I checked the documentation (Color & Font functions) and could only find fl_font which seemed to be part of an fl_draw package.
I expected calls for things like
win2_flag1->textsize(11); ... but globally win2_flag1->labelsize(11); .......but globally etc...
Do they exist ?
I don't know what would be win2_flag1 in your mind.
Among possible things, there are :
For any given pointer to n Fl_Widget (e.g., Fl_Button *) widget
widget->labelsize(size); // sets the widget's label size
widget->labelfont(fontnumber); // sets the widget's label font
widget->labelcolor(color); // sets the widget's label color
widget->label(text); // sets the widget's label text
But this applies to the given widget only.
Functions with effects on all widgets were described in my previous post. A key thing is these functions must be used before widgets are created. A simple way to achieve that is to begin your main() with
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'.