跳到正文

Fieldset

在同一个图例和共享语义状态下组织相关字段。

正在加载交互演示…

#导入

从 quickgui 导入 Fieldset。

use quickgui::*;

#用法

Fieldset::new()
    .root().flex_col().gap(12.0)
    .child(text("Account"))

#结构

  • Fieldset::root
  • Fieldset::legend
  • Fieldset::description
  • Fieldset::control

#API 参考

展开条目查看说明和完整签名。短横线表示声明中未记录默认值。

Fieldset

查看源码
pub fn new(id: impl Into<ElementId>) -> Self
idpub const fn id(self) -> ElementId—

Configures id for this part.

pub const fn id(self) -> ElementId
查看源码
legend_idpub fn legend_id(self) -> ElementId—

Configures legend id for this part.

pub fn legend_id(self) -> ElementId
查看源码
description_idpub fn description_id(self) -> ElementId—

Configures description id for this part.

pub fn description_id(self) -> ElementId
查看源码
is_disabledpub const fn is_disabled(self) -> bool—

Configures is disabled for this part.

pub const fn is_disabled(self) -> bool
查看源码
disabledpub fn disabled(mut self, disabled: bool) -> Self—

Configures disabled for this part.

pub fn disabled(mut self, disabled: bool) -> Self
查看源码
fieldpub fn field(self, control_id: impl Into<ElementId>) -> Field—

Create one nested field with group disabled state already applied.

pub fn field(self, control_id: impl Into<ElementId>) -> Field
查看源码

Fieldset::root_with

查看源码
pub fn root_with(self, root: Element) -> Element

Decorate an application-owned group root with legend and description relationships.

Fieldset::root

查看源码
pub fn root(self) -> Element

Create the unstyled root part. Use [`Self::root_with`] to supply an existing element.

Fieldset::legend_with

查看源码
pub fn legend_with(self, legend: Element) -> Element

Fieldset::legend

查看源码
pub fn legend(self) -> Element

Create the unstyled legend part. Use [`Self::legend_with`] to supply an existing element.

Fieldset::description_with

查看源码
pub fn description_with(self, description: Element) -> Element

Fieldset::description

查看源码
pub fn description(self) -> Element

Create the unstyled description part. Use [`Self::description_with`] to supply an existing element.

Fieldset::control_with

查看源码
pub fn control_with(self, control: Element) -> Element

Apply fieldset disabled state to an application-owned direct control.

Fieldset::control

查看源码
pub fn control(self) -> Element

Create the unstyled control part. Use [`Self::control_with`] to supply an existing element.