Skip to content

Fieldset

Groups related fields under one legend and shared semantic state.

Loading interactive demo…

#Import

Import Fieldset from quickgui.

use quickgui::*;

#Usage

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

#Anatomy

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

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

Fieldset

View source
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
View source
legend_idpub fn legend_id(self) -> ElementId—

Configures legend id for this part.

pub fn legend_id(self) -> ElementId
View source
description_idpub fn description_id(self) -> ElementId—

Configures description id for this part.

pub fn description_id(self) -> ElementId
View source
is_disabledpub const fn is_disabled(self) -> bool—

Configures is disabled for this part.

pub const fn is_disabled(self) -> bool
View source
disabledpub fn disabled(mut self, disabled: bool) -> Self—

Configures disabled for this part.

pub fn disabled(mut self, disabled: bool) -> Self
View source
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
View source

Fieldset::root_with

View source
pub fn root_with(self, root: Element) -> Element

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

Fieldset::root

View source
pub fn root(self) -> Element

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

Fieldset::legend_with

View source
pub fn legend_with(self, legend: Element) -> Element

Fieldset::legend

View source
pub fn legend(self) -> Element

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

Fieldset::description_with

View source
pub fn description_with(self, description: Element) -> Element

Fieldset::description

View source
pub fn description(self) -> Element

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

Fieldset::control_with

View source
pub fn control_with(self, control: Element) -> Element

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

Fieldset::control

View source
pub fn control(self) -> Element

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