
|
class gui.RadioChoice(): | implements WindowChildView | constructor ( | choices :: List.of(String), | ~choice_to_label: choice_to_label :: Any -> Any = values, | ~choice_equal: choice_equal :: Function.of_arity(2) = (_ == _), | ~selection: selection :: ObsOrValue.of(Any) = #false, | ~action: action :: Any -> ~any = values, | ~label: label :: ObsOrValue.of(maybe(View.LabelString)) = #false, | ~styles: styles :: List.of(RadioChoice.Style) = [#'vertical], | ~enable: enable :: ObsOrValue.of(Boolean) = #true, | ~margin: margin :: ObsOrValue.of(View.Margin) = [2, 2], | ~min_size: min_size :: ObsOrValue.of(Size) = [#false, #false], | ~stretch: stretch :: ObsOrValue.of(Stretch) = [#true, #true], | ~window_callbacks: window_callbacks :: maybe(WindowCallbacks) = #false | ) |
|
|
|
|
Like
gui.Choice, but presented as radio buttons instead of a
popup menu. Unlike
gui.Choice, the
choices list
cannot be changed.
The styles list must include either #'vertical or
#'horizontal.
A radio choice style option:
#'vertical: Arrange radio-button choices vertically.
Vertical arrangement is the default if #'horzontal is not
specified, and #'vertical and
#'horizontal are mutually exclusive.
#'horizontal: Arrange radio-button choices
horizontally.
#'horizontal_label: When the radio-choice control has a
label, show it to the left of the control. Horizontal label placement is
the default if #'vertical_label is not specified, and
#'horizontal_label and #'vertical_label are mutually
exclusive.
#'vertical_label: When the radio-choice control has a
label, show it above the control.