On 18 Feb 2013, at 22:38, edgar wrote:
> Hi.
>
> I am not able to change labelfont() and labelsize() in fltk-1.3.2
> I am using the g++ compiler and Ubuntu 12.10.
>
> Here is an example of the code with Hello World:
>
> #include <FL/Fl.H>
> #include <FL/Fl_Window.H>
> #include <FL/Fl_Box.H>
>
> int main(int argc, char **argv) {
> Fl_Window *window = new Fl_Window(340,180);
> Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
> box->box(FL_UP_BOX);
> box->labelfont(FL_BOLD);
FL_BOLD is not a font face name; it is a modifier.
Perhaps you meant FL_HELVETICA or FL_HELVETICA_BOLD or some such?
Note that, FL_HELVETICA_BOLD is actually the value (FL_HELVETICA | FL_BOLD)
Take a look at the examples in the test folder, and see how label fonts and
sizes are handled, and check the docs for text drawing and font handling
details.
It'll all make much more sense...
> box->color(FL_WHITE);
> box->labelcolor(FL_GREEN);
> box->labelsize(36);
> box->labeltype(FL_ENGRAVED_LABEL);
> window->end();
> window->show(argc, argv);
> return Fl::run();
> }
>
> I can email a screenshot, but I don't see where to attach the screenshot
> to this message. Thanks,
> Edgar Crockett
>
>
> _______________________________________________
> fltk mailing list
> [email protected]
> http://lists.easysw.com/mailman/listinfo/fltk
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk