0
$\begingroup$

Is there a way to put text (e.g. a question) above a radio button box such as the one below, either

  • in the main part of the box (area marked blue), or
  • in the header (area marked red),
  • or in both?

I couldn't find any way to do this under "Options" in the help for RadioButtonBar.

enter image description here

$\endgroup$
0

1 Answer 1

1
$\begingroup$

I've worked out the way to put text in the blue area. It's quite straightforward and requires giving another argument to Column rather than to RadioButtonBar:

Clear[a]; While[Not[StringQ[a]],
 a = DialogInput[{choice = {}},
 Column[{
 "\n Some text goes here \n",
 RadioButtonBar[Dynamic[choice], {"One", "Two", "Three"}],
 Button["Okay", If[choice =!= {}, DialogReturn[choice]]]
 }]]]

enter image description here

$\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.