RadioGroup
管理单选状态以及 Radio 项之间的键盘移动。
正在加载交互演示…
RadioGroup::new()
.root().flex_col().gap(8.0)#导入
从 quickgui 导入 RadioGroup。
use quickgui::*;#用法
RadioGroup::new()
.root().flex_col().gap(8.0)#结构
RadioGroup::root
#API 参考
展开条目查看说明和完整签名。短横线表示声明中未记录默认值。
RadioGroup
查看源码pub const fn new() -> Selfread_onlypub const fn read_only(mut self, read_only: bool) -> Self—
Show values the user may read but not change, Base UI's `readOnly`.
pub const fn read_only(mut self, read_only: bool) -> Self查看源码requiredpub const fn required(mut self, required: bool) -> Self—
Require a selection before submission, Base UI's `required`.
pub const fn required(mut self, required: bool) -> Self查看源码is_read_onlypub const fn is_read_only(self) -> bool—
is_requiredpub const fn is_required(self) -> bool—
RadioGroup::root_with
查看源码pub fn root_with(self, root: Element) -> ElementDecorate an application-owned group root without adding layout or appearance.
RadioGroup::root
查看源码pub fn root(self) -> ElementCreate the unstyled root part. Use [`Self::root_with`] to supply an existing element.
radio_group
查看源码pub fn radio_group() -> ElementCreate an unstyled semantic radio-group root. This shorthand is equivalent to `RadioGroup::new().root_with(div())`.
