{ Fl_Double_Window* o = new Fl_Double_Window(120, 100);
w = o; if (w) {/* empty */}
{ Fl_Menu_Button* o = new Fl_Menu_Button(25, 25, 69, 20, "menu");
o->type(2);
o->menu(menu_menu);
} // Fl_Menu_Button* o
o->end();
} // Fl_Double_Window* o
w->show(argc, argv);
return Fl::run();
}
On Tuesday, May 3, 2022 at 2:53:07 PM UTC-7 Ian MacArthur wrote:
On 3 May 2022, at 20:16, supsm17 wrote:
>
> That should probably work, but for some reason the label (or box) doesn't show up when the type is changed. It still appears, but is just invisible. Am I missing something?
It certainly should work.
I have no idea why it would not - you will have to show us an example of what you are doing.
Can you post a minimal, compileable, example that shows the effect, so we can see what has gone awry, please?
>
> On Monday, May 2, 2022 at 2:34:18 PM UTC-7 Ian MacArthur wrote:
> On 2 May 2022, at 19:17, supsm17 wrote:
> >
> > I have a Fl_Check_Button which has a label, I want some menu to pop up when I right click the label. I'm not sure if this could be accomplished with Fl_Menu, but for the right click I think I can use a boxless Fl_Button. Will I have to have a hidden Fl_Box?
>
>
> Would you not just use an Fl_Menu_Button, with the box type and text set appropriately, as the label?
>
> Just set the type to POPUP3 (well, I think it is POPUP3 for the right click... might be POPUP2...) and that’s basically the job done.
>
> https://www.fltk.org/doc-1.4/classFl__Menu__Button.html#a2c0d1cab5522c531309169acf0e1517e >
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.