FLTK logo

Re: [fltk.general] Re: can I change the default attributes so I can set"global attributes"

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

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
fl_open_display(); // needs #include <FL/platform.H>
and then use the global-effect function calls or change the value of public global variables.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/109eb1bd-fecd-4f8e-b7bb-a00e2c72193an%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.