Well, this seems to work..

static void hack(Fl_Widget*, void* data)
{
        Fl_Input_Choice* o = static_cast<Fl_Input_Choice*>(data);
        Fl_Menu_Item const* item = o->menubutton()->mvalue();
        if(item && !item->flags) {
                o->input()->value(o->menubutton()->text());
        }
        o->do_callback();
}

then, in main()

       inp->menubutton()->callback(hack, inp);


.. but it seems a little scary.

Is this bug, by the way, or is Fl_Input_Choice
supposed to work this way?

-Stan



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

Reply via email to