Hi,
Thanks so much...I think I wasn't clear when I said manubar label.
I meant the "Edit" in "Edit/Change".
I can change "Change" to "new change", but can't change "Edit" to "File"!


My application is where user selects different interpolation methods
like cubic, linear etc from the menu. And I would like the menu
to show which method was chosen by the user.

Thanks.
Suja.


> Suja wrote:
> > Thanks...But this example shows how to change submenu labels.
> > I need to change the menubar label itself...am not able to make it work
> > the same way described as submenu's...
>
>       Specifically:
>
> #include <FL/Fl.H>
> #include <FL/Fl_Window.H>
> #include <FL/Fl_Menu_Bar.H>
> #include <stdlib.h>
> void Change_CB(Fl_Widget *w, void *) {
>     Fl_Menu_Bar *menu = (Fl_Menu_Bar*)w;
>     menu->label("Some New Label");
> }
> void Quit_CB(Fl_Widget *, void *) {
>     exit(0);
> }
> int main() {
>     Fl_Window *win = new Fl_Window(400,400);
>     Fl_Menu_Bar *menu = new Fl_Menu_Bar(0,0,400,25,"Menu Label");
>     menu->align(FL_ALIGN_BOTTOM|FL_ALIGN_CENTER);
>     menu->add("File/Quit",   FL_CTRL+'q', Quit_CB);
>     menu->add("Edit/Change", FL_CTRL+'c', Change_CB);
>     win->end();
>     win->show();
>     return(Fl::run());
> }

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to