On 17/03/12 09:45, Ian MacArthur wrote: > On 16 Mar 2012, at 22:19, Jeff Ellis<[email protected]> wrote: >> Is it possible to have both an image and a label in an Fl_Menu_Item? (E.g., >> like popupmenu'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. > > The short answer is no, you can not, sorry to say. > > Regular button widgets and so forth can do that, but for historical reasons > the menu items in 1.x are not true widgets and don't support that usage. > > But for now, FLTK-1.3 is the stable branch& it can't do that...
You can achieve menu icon functionality with both FLTK 1.1.x and 1.3.x by generating Fl_Multi_Label instances comprising text and a pixmap then using them as the menu item's label. This technique is employed by programs such as fldigi to effect icons in menus. I'll supply to those already on this thread (or anyone else that's interested) the functions that facilitate this along with a simple demo program that shows how to use them (bit too verbose to inline or explain it all here). _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

