checkbox

We recommend that you use checkbox in checkbox_group

checkbox_group inherits from view

Example

Basic usage

If you want to indicate the selected state, use selected to specify

1<checkbox_group>
2  <checkbox text="'rap'"></checkbox>
3  <checkbox text="'play basketball'" selected="true"></checkbox>
4</checkbox_group>

Properties

checkbox 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
checkbox_background_colorCheckbox background colorMakepadColor
checkbox_background_visibleIs the checkbox background visible?bool
checkbox_hover_colorCheckbox hover colorMakepadColor
checkbox_selected_colorCheckbox selected colorMakepadColor
stroke_colorStroke colorMakepadColor
stroke_hover_colorStroke hover colorMakepadColor
stroke_selected_colorStroke selected colorMakepadColor
checkbox_border_colorCheckbox border colorMakepadColor
checkbox_border_widthCheckbox border widthF32
scaleScale ratioF32
background_colorBackground colorMakepadColor
hover_colorHover colorMakepadColor
focus_colorFocus colorMakepadColor
shadow_colorShadow colorMakepadColor
border_colorBorder colorMakepadColor
background_visibleBackground visible or notbool
border_widthBorder widthF32
border_radiusBorder radiusF32
spread_radiusSpread radiusF32
blur_radiusBlur radiusF32
shadow_offsetShadow offsetVec2
cursorMouse cursor styleMouseCursor
valueValueString
selectedSelected or notbool
textText contentString
checkbox_typeCheckbox typeGChooseType
abs_posabsolute positionDVec2
marginmarginMargin
widthwidthSize
heightheightSize
scrollscroll offsetDVec2
clip_xclip X axis or notbool
clip_yclip Y axis or notbool
paddingpaddingPadding
alignalignmentAlign
flowflow modeFlow
spacingspacingF64
visiblevisible or notbool
animation_keyanimation keybool
grab_key_focusCapture keyboard focusbool
event_keyevent keybool

checkbox_group properties

NameDescriptionType
themeThemeThemes
background_colorBackground colorMakepadColor
hover_colorHover colorMakepadColor
focus_colorFocus colorMakepadColor
border_colorBorder colorMakepadColor
border_widthBorder widthF32
border_radiusBorder radiusF32
visibleVisible or notbool
background_visibleBackground visible or notbool
shadow_colorShadow colorMakepadColor
spread_radiusShadow spread 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_xClip X axis or notbool
clip_yClip Y axis or notbool
paddingPaddingPadding
alignAlignmentAlign
flowFlowFlow
spacingSpacingF64
event_orderEvent orderEventOrder
dpi_factorDPI scaling factorF64
optimizeView optimization optionsViewOptimize
capture_overloadCapture overloadbool
event_keyEvent keybool
block_child_eventsBlock child event deliverybool

Event callback

checkbox event callback

NameDescriptionParameters
clickedClick eventGCheckboxClickedParam
hover_inMouse hover eventGCheckboxHoverParam
hover_outMouse out eventGCheckboxHoverParam

checkbox_group event callback

NameDescriptionParameters
changedState change eventGCheckboxGroupEventParam