Yes, using menu() in stead of copy() works for me as well for this menu, but
copy() does not work. Does copy work for you?
Thanks for your quick response.
Steve.
> Steve Maas wrote:
> > Hi,
> >
> > I am having some weird troubles using the Fl_Menu widget. The following
> > menu was the simplest I could create that reproduces the problem.
>
> Works for me:
>
> ---- snip
> #include <stdio.h>
> #include <FL/Fl.H>
> #include <FL/Fl_Double_Window.H>
> #include <FL/Fl_Menu_Bar.H>
>
> Fl_Menu_Item items[] = {
> { "File", 0, 0, 0, FL_SUBMENU },
> { "Item1"},
> { "Sub1", 0, 0, 0, FL_SUBMENU },
> { "item1" },
> { "item2" },
> { "item3" },
> { "item4" },
> {0},
> { "Sub2", 0, 0, 0, FL_SUBMENU },
> { "item5" },
> { "item6" },
> { "item7" },
> { "item8" },
> {0},
> { "Item2"},
> {0},
> { 0 } };
>
> int main()
> {
> Fl_Double_Window win(300, 300, "test");
> Fl_Menu_Bar menubar(0,0,300,25);
> menubar.menu(items);
> win.end();
> win.show();
> return Fl::run();
> }
> ---- snip
>
> Note use of menu(items) instead of copy(items)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk