Navigation
Synopsis An interactive choice.
Function choice(list[str] choices, void(str s) ccallback, FProperty props...)
Description Presents a list of named choices to the user. When the user selects one of them, callback ccallback is called with that choice as argument.

public Figure choiceTest(){
  str state = "A";
  return vcat([ choice(["A","B","C","D"], void(str s){ state = s;}),
                text(str(){return "Current state: " + state ;}, left())
              ]);
}
render(choiceTest());
choice1
Pitfalls Due to limitations in SWT this does not behave correctly when being placed over or under figures, so do not use them in overlay or mouseOver.
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.