summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2017-09-11 19:06:32 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2017-09-11 19:06:32 +0000
commit3d9014806563ceb1b2e4921f094f55bad68c1ada (patch)
treeffa22f9feb35270dd0ac265581dd36359bb98220 /examples
parent322208b8556790bea75efb5a468813c9a49af0d8 (diff)
Remove leading underscore from labeltype(s) in new demo.
Since svn r12443 we can use all labeltypes (including FL_IMAGE_LABEL and FL_MULTI_LABEL) w/o leading underscore. We can also use both documented variants to assign an FL_MULTI_LABEL to an Fl_Menu_Item. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12444 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'examples')
-rw-r--r--examples/howto-menu-with-images.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/howto-menu-with-images.cxx b/examples/howto-menu-with-images.cxx
index 0a0e83c96..4682dca71 100644
--- a/examples/howto-menu-with-images.cxx
+++ b/examples/howto-menu-with-images.cxx
@@ -113,14 +113,18 @@ int AddItemToMenu(Fl_Menu_ *menu, // menu to add item to
Fl_Multi_Label *ml = new Fl_Multi_Label;
// Left side of label is image
- ml->typea = _FL_IMAGE_LABEL;
+ ml->typea = FL_IMAGE_LABEL;
ml->labela = (const char*)pixmap;
// Right side of label is text
ml->typeb = FL_NORMAL_LABEL;
ml->labelb = item->label();
- // Assign multilabel to item
+ // Assign multilabel to item.
+ // Note: There are two documented ways to achieve this. Both of them
+ // are supported, but one of them is commented out intentionally.
+
+ // item->label(FL_MULTI_LABEL, (const char *)ml);
ml->label(item);
return i;