Is there some way to make Fl_Input_Choice behave like Fl_Choice
with respect to (not) choosing submenu labels? To illustrate,
the "Input Choice" widget in the program below allows the user
to choose "A-M" or "N-Z," while the "Choice" widget does not.
I'm trying to figure out how to make them both act the same.

Thanks as always,
Stan

////////////////////////////////////////////////////////////////
#include <FL/Fl_Double_Window.H>
#include <FL/Fl.H>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Input_Choice.H>

int main()
{
        Fl_Double_Window win(300, 300);
        Fl_Choice* choice = new Fl_Choice(100, 50, 100, 20, "Choice:");
        Fl_Input_Choice* inp = new Fl_Input_Choice(100, 70, 100, 20,
                  "Input Choice:");
        win.end();

        choice->add("A-M/apple");
        choice->add("A-M/banana");
        choice->add("N-Z/pineapple");
        choice->add("N-Z/papaya");

        inp->add("A-M/apple");
        inp->add("A-M/banana");
        inp->add("N-Z/pineapple");
        inp->add("N-Z/papaya");

        win.show();
        return Fl::run();
}

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

Reply via email to