![]() |
|
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()); ![]()
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.
![]() |