> Is it possible to have both an image and a label in an Fl_Menu_Item? (E.g., 
> like popup menu's in most apps like, for example, MS-Outlook -- little icon 
> image on the left and menu label on the right.) I can't seem to figure out 
> how to do it.
>
> I'm using FLTK 1.3.

Update to my earlier response:

Jon Whellams points out that fldigi has code for doing exactly this - it 
leverages Fl_Multi_Label to get the desired effect, and I took a quick looks 
and it seems the approach would be portable, so you could take a look at that 
code (it's GPLv3) and see if that'll help you.

As an alternate (and very much more nasty hack) workaround, you could generate 
"icon" images for your menu labels that incorporate the actual icon image and 
the label text pre-rendered... Then use that in your menus.
(A slightly more graceful version of this might render the label text into the 
"icon" at runtime so that it would use the same font/size as the rest of the 
app.)

I think I'd take a good look at fldigi though, if I were you...






_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to