pub struct FormControl {}Expand description
A form control (button, slider, spin button) floating over the sheet.
Fields§
§id: u32§kind: ControlKind§anchor: Anchor§name: StringThe name shown in the Selection Pane (Button 3); empty means the kind and id.
text: StringThe caption of a button.
link: Option<String>The linked cell as reference text: $B$2 on the control’s own sheet, or Sheet2!$B$2.
Structural edits rewrite it like a formula reference.
value: u32The current value of a slider or spin button (the linked cell holds it too).
min: u32§max: u32§step: u32Incremental change: one arrow click or arrow key.
page: u32Page change (sliders): a click on the track, or Page Up / Page Down.
horizontal: boolA slider lies horizontally (false: vertically).
action: Option<ControlAction>What a button runs.
print: boolPrinted with the sheet.
locked: boolLocked when the sheet is protected.
Implementations§
Source§impl FormControl
impl FormControl
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
The name shown for the control: its own, else Button 3, Slider 4, Spin Button 5.
Sourcepub fn check_numbers(&self) -> Result<(), String>
pub fn check_numbers(&self) -> Result<(), String>
Checks the numbers of a slider or spin button: 0 ≤ min < max ≤ 30000, 1 ≤ step ≤ max − min, and (sliders) page ≥ step. Each rule has its own message.
Trait Implementations§
Source§impl Clone for FormControl
impl Clone for FormControl
Source§fn clone(&self) -> FormControl
fn clone(&self) -> FormControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more