Using Fl_Multi_Label many times for the label of a Fl_Menu_Iem. How ?

18 views
Skip to first unread message

K Dmitrij

unread,
Oct 14, 2017, 9:33:24 AM10/14/17
to fltkg...@googlegroups.com

Hi.

I remember Greg has told about that, and I need snippet
or link to documenation.

What I want: two icons left side for menuitem,
and text is right side..

Any tips, please.

--
regards

Greg Ercolano

unread,
Oct 14, 2017, 2:35:39 PM10/14/17
to fltkg...@googlegroups.com
On 10/14/17 06:33, K Dmitrij wrote:
Hi.

I remember Greg has told about that, and I need snippet
or link to documenation.

   See the docs for Fl_Multi_Label.

    Some clarifications were made recently in the 1.4.x svn current docs
    including some example code for doing just an image/label pair.

    Pull 1.4.x svn current for the latest docs, which have some
    example code and some clarifications for how to use a single
    Fl_Multi_Label. You'd have to make the doxygen docs.

    Or, it just so happens I have a snapshot of the latest 1.4.x docs
    on my website because I'm working on the docs for a new widget,
    and use my ipad to review it over the net:
    http://seriss.com/people/erco/fltk/simple-terminal/structFl__Multi__Label.html

    Note the example code under "Example Use: Fl_Menu_Bar".
    The use is similar for most label() oriented widgets, AFAIK.

    Also in 1.4.x is some example code in examples/howto-menu-with-images.cxx
    A copy attached here.



What I want: two icons left side for menuitem,
and text is right side..

Any tips, please.

    Should be easy for you to extend the example code in 1.4.x
    to use two multilabels, if you understand the concept of how
    one works first. Just assign the second multilabel to the first
    to chain them together for a total of three (image,image,label)
    e.g.



item->label()
        |--> Fl_Multi_Label (#1)
                  |--> image()   -- 1st image (left)
                  |--> label()
                        |--> Fl_Multi_Label (#2)
                               |--> image()   -- 2nd image (middle)
                               |--> label()   -- label (right)



howto-menu-with-images.cxx

K Dmitrij

unread,
Oct 14, 2017, 8:24:43 PM10/14/17
to fltkg...@googlegroups.com

Greg, thank you. I will try it !




From: Greg Ercolano
Subject: Re: [fltk.general] Using Fl_Multi_Label many times for the label of a Fl_Menu_Iem. How ?
 
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages