|
|
On Tuesday, 18 May 2021 at 21:43:55 UTC+1 holm.h.. wrote:
Hello,
Is there a way to set the background of a Fl_Counter widget ? I want to replace the white field with another color. color() set the color of the buttons textcolor set the color of the font labelcolor do not have any effect.
Hmm, possibly not... Looking at the sources, the box that holds the digit seems to be hard-coded to FL_BACKGROUND2_COLOR
at line 54 or thereabouts:
draw_box(boxtype[0], xx[0], y(), ww[0], h(), FL_BACKGROUND2_COLOR);
So... well, you could try changing FL_BACKGROUND2_COLOR but that might have "unhelpful" side effects in other widgets. Or copy/paste the Fl_Counter code and modify the widget to take a user selectable background colour in place of the hard-coded FL_BACKGROUND2_COLOR.
--
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/a7a39958-8207-4cd0-bea8-d29a4dd967d8n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |