Group Abstract Group Abstract

Message Boards Message Boards

0
|
1K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Radio button bar in square layout

Posted 5 months ago

I'm stuck. I can arrange four radio buttons in a square layout with this code:

RadioButtonBar["A", {"A", "B", "C", "D"}, Appearance -> "Vertical" -> {2, 2}]

enter image description here

That's exactly how I want the layout. However, when I place it inside a FormObject, I get unwanted displayed code or I can't get the radio buttons to retain this square configuration:

FormObject[<|
    "CHOOSE: " -> <|
        "Interpreter" -> {"A" -> 1, "B" -> 2, "C" -> 3, "D" -> 4},
        "Control" -> 
     RadioButtonBar["A", {"A", "B", "C", "D"}, 
      Appearance -> "Vertical" -> {2, 2}]
      |>
  |>]

enter image description here

I did ask the Notebook Assistance Chat, but it was not helpful helpful in this case (though it usually is). It seems I've made a mistake and don't understand some nuance of FormObject that would make this work. So I appeal to you all. What am I doing wrong?

Thanks in advance,

Mark

POSTED BY: Mark Greenberg
2 Replies
Posted 5 months ago

Thank you, Michael. Both of your suggestions worked. I went with your first suggestion because I could more clearly understand the function used to define the control. I also learned from your explanation.

Thanks again,

Mark

POSTED BY: Mark Greenberg
POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard