Remove border/shadow of Fl_Choice.H widget

47 views
Skip to first unread message

Daniel G.

unread,
Aug 13, 2025, 7:39:01 AMAug 13
to fltk.general
Hi,

can you please help me out, I fail to get rid of the border / shadow of a FL_Choice widget. Can you hint me how to do it / where to find the appropiate documentation? 

For buttons etc. the same thing works by manipulating the box.

Thanks,
Daniel

Manolo

unread,
Aug 14, 2025, 2:48:02 AMAug 14
to fltk.general
The Fl_Choice box is presently hardcoded in the 1st statement of its draw() member function which reads:
  Fl_Boxtype btype = Fl::scheme() ? FL_UP_BOX           // non-default uses up box
                                  : FL_DOWN_BOX;        // default scheme uses down box

To bypass that, you could do this:
- define a class for your custom Fl_Choice object(s) derived from Fl_Choice
- orerride the void draw() member function of this class with a copy of Fl_Choice::draw()
to be found in file src/Fl_Choice.cxx
- alter the 1st statement of your custom draw() function, possibly as follows:
  Fl_Boxtype btype = FL_NO_BOX;


Daniel G.

unread,
Aug 14, 2025, 11:13:01 AMAug 14
to fltk.general
Thank you for your help, not satisfying but works well! :)
Reply all
Reply to author
Forward
0 new messages