Perfect, it worked. Thanks so much.
I was trying to access it as menu_IP->label("something");
without the "[0]"!!!
And thanks for telling abt the FL_Choice.
Looks like that is a better widget for this application.
Thanks.
>
>
> On Jul 11, 2007, at 2:56 AM, Suja wrote:
>
> > But I am not even able to access the top menu label.
>
> Why not? Just call "menu_IP[0]->label("something");"
>
> > Fl_Menu_Item RunImageViewerGUI::menu_IP[] = {
> > {"Interpolation", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
> > {"Nearest", 0, (Fl_Callback*)RunImageViewerGUI::cb_Nearest},
> > {"Linear", 0, (Fl_Callback*)RunImageViewerGUI::cb_Linear},
> > {"Cubic", 0, (Fl_Callback*)RunImageViewerGUI::cb_Cubic},
> > {"Sinc", 0, (Fl_Callback*)RunImageViewerGUI::cb_Sinc},
> > {0,0,0,0,0,0,0,0,0},
> > {0,0,0,0,0,0,0,0,0}
> > };
> >
> > And when user selects say, Nearest, I need the menubar label to
> > change from "Interpolation" to "Nearest". So that user knows what
> > is the interpolation now.
>
> Have you looked at Fl_Choice?
>
> "The only difference between this and a Fl_Menu_Button is that the
> name of the most recent chosen menu item is displayed inside the box,
> while the label is displayed outside the box."
>
> > But printing menu->label() displays nothing.
>
> Please send a more complete example. Which widget class do you use to
> display your menu?
>
> ----
> http://robowerk.com/
>
>
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk