radio

We recommend that you put radio in radio_group for use

radio_group inherits from view

Example

Basic usage

You may have found that radio_group has selected but checkbox_group does not. This is a point that needs extra attention at present. We will unify the final style in the next version

WARNING

It is unwise to set selected in radio, so the final compilation may not pass when you use the radio_group package

Especially if you set multiple radios to selected="true" at the same time

1<radio_group selected="1">
2  <radio text="'male'"></radio>
3  <radio text="'female'"></radio>
4</radio_group>

Properties

radio properties

NameDescriptionType
themeThemeThemes
colorColorMakepadColor
text_hover_colorText hover colorMakepadColor
text_focus_colorText focus colorMakepadColor
font_sizeFont sizeF64
height_factorHeight factorF64
wrapText wrapping methodTextWrap
font_familyFont family pathLiveDependency
text_visibleIs the text visiblebool
sizeSizeF32
radio_background_colorRadio button background colorMakepadColor
radio_background_visibleIs the radio button background visible?bool
radio_hover_colorRadio button hover colorMakepadColor
radio_selected_colorRadio button selected colorMakepadColor
stroke_colorStroke colorMakepadColor
stroke_hover_colorStroke hover colorMakepadColor
stroke_selected_colorStroke selected colorMakepadColor
radio_border_colorRadio button border colorMakepadColor
radio_border_widthRadio button border widthF32
scaleScale ratioF32
background_colorBackground colorMakepadColor
hover_colorHover colorMakepadColor
focus_colorFocus colorMakepadColor
shadow_colorShadow colorMakepadColor
border_colorBorder colorMakepadColor
background_visibleIs the background visible?bool
border_widthBorder widthF32
border_radiusBorder radiusF32
spread_radiusSpread radiusF32
blur_radiusBlur radiusF32
shadow_offsetShadow offsetVec2
cursorMouse cursor styleMouseCursor
valueValueString
selectedIs it selected?bool
textText contentString
radio_typeRadio button typeGChooseType
abs_posAbsolute positionDVec2
marginMarginMargin
widthWidthSize
heightHeightSize
scrollScroll offsetDVec2
clip_xClip X axisbool
clip_yClip Y axisbool
paddingPaddingPadding
alignAlignmentAlign
flowFlow modeFlow
spacingSpacingF64
visibleVisiblebool
animation_keyAnimation keybool
grab_key_focusCapture keyboard focusbool
event_keyEvent keybool

radio_group properties

NameDescriptionType
selectedWhich radio button is selectedI32
themeThemeThemes
background_colorBackground colorMakepadColor
hover_colorHover colorMakepadColor
focus_colorFocus colorMakepadColor
border_colorBorder colorMakepadColor
border_widthBorder widthF32
border_radiusBorder radiusF32
visibleIs it visiblebool
background_visibleIs the background visiblebool
shadow_colorShadow colorMakepadColor
spread_radiusShadow diffusion radiusF32
blur_radiusShadow blur radiusF32
shadow_offsetShadow offsetVec2
cursorMouse pointer styleMouseCursor
animation_keyAnimation keybool
grab_key_focusCapture keyboard focusbool
block_signal_eventBlock signal eventbool
abs_posAbsolute positionDVec2
marginMarginMargin
widthWidthSize
heightHeightSize
scrollScroll offsetDVec2
clip_xWhether to clip the X axisbool
clip_yWhether to clip the Y axisbool
paddingPaddingPadding
alignAlignmentAlign
flowFlow modeFlow
spacingSpacingF64
event_orderEvent orderEventOrder
dpi_factorDPI scaling factorF64
optimizeView optimization optionsViewOptimize
capture_overloadCapture overloadbool
event_keyEvent keybool
block_child_eventsBlock child event deliverybool

Event callbacks

radio event callbacks

NameDescriptionParameters
clickedClick eventGRadioClickedParam
hover_inMouse hover eventGRadioHoverParam
hover_outMouse out eventGRadioHoverParam

radio_group event callbacks

NameDescriptionParameters
changedState change eventGRadioGroupEventParam