2
$\begingroup$

Consider some list:

list = {"A","B","C","D"}

How to select only particular values from it using a dynamic dialog window that prevents the code below it from evaluating before the choice is made (by using e.g. DialogInput)?

$\endgroup$

1 Answer 1

5
$\begingroup$

You can use TogglerBar.

selectionDialog[list_] := 
 DialogInput[{choice = {}}, 
  Column[{TogglerBar[Dynamic[choice], list], 
    Button["OK", DialogReturn[choice]]}]]

list = {"A", "B", "C", "D"};
selectionDialog[list]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.