True; this would be quite challenging to achieve as Fl_Menu_Item provides only plain draw().
For the similar reason (to add icons support inside menu items) I had to literally 'fork' the whole menu hierarchy :S Sanel On Thu, Jan 31, 2013 at 05:50:21AM -0800, MacArthur, Ian (Selex ES, UK) wrote: > > > Thanks for the reply. This code works well for changing the text > > foreground color. > > > > However I also need to change the background color (the gray box behind > > the text). > > > > Any ideas how to change the background color in an Fl_Menu_Bar item? > > I don't think there is an easy fix for this (though hopefully others will > know better!) but you might be able to make it so... > > The method that actually draws the menu items, Fl_Menu_Item::draw(...), is > defined in Fl_Menu.cxx, so I guess it might be possible to derive your own > Fl_Menu class (and maybe also Fl_Menu_Bar class and Fl_Menu_Item struct...) > and then add in the ability to set the menu item background... > > Note that Fl_Menu_Item::draw(...) actually can cope with drawing different > boxtypes and colours and so forth, but there's no way to "ask" for those > features for regular menu items, it is meant for menu buttons and so forth... > Though maybe you can do something with selection_color(); I wonder if that > would work...? Um, probably not... > > > Anyway; best bet is probably to hope that Sanel or someone knows a workaround > for this! > > Cheers, > -- > Ian > > > > > > ******************************************************************** > This email and any attachments are confidential to the intended > recipient and may also be privileged. If you are not the intended > recipient please delete it from your system and notify the sender. > You should not copy it or use it for any purpose nor disclose or > distribute its contents to any other person. > ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

