Gnumeric · Interactive worksheet controls · Intermediate
Control Model Inputs with Checkboxes and Sliders in Gnumeric
Link a checkbox and an integer slider to a small cost model, check both states and endpoints, and keep formulas separate from widget-controlled inputs.
Gnumeric 1.12.62 source-qualified widget workflow; independent arithmetic; native verification pending · Editorial standards
A worksheet checkbox can change a Boolean input, while a slider can change a quantity. Keep those writable inputs separate from formulas: a control linked to a result cell can replace the calculation you meant to preserve.
Scope: Gnumeric 1.12.62 GTK desktop source, English controls, and the upstream 1.12 manual, reviewed 21 October 2026. This is a documentation-qualified exercise for a disposable Linux desktop workbook, not an observed GUI run. Widget creation, interaction, layout, saving and reopening remain untested. Historical 1.12.57 tests elsewhere on this site do not verify this workflow.
Build the model without widgets first
On a new sheet named Plan, enter:
| Cell | Entry |
|---|---|
| A1 | Practice workshop cost |
| A2 / B2 | Attendees / 10 |
| A3 / B3 | Include equipment / =FALSE() |
| A4 / B4 | Cost per attendee / 12 |
| A5 / B5 | Optional equipment cost / 45 |
| A7 / B7 | Total cost / =B2*B4+IF(B3,B5,0) |
| A9 | Controls change B2 and B3 only; B7 is a formula. |
B3 must be a Boolean FALSE, not the text word False. The temporary =FALSE() initializer makes that type explicit; the checkbox will subsequently write a Boolean value into this input. Expected B7 is 120. This example uses comma-separated formula arguments; adapt the separator if your locale requires it.
Temporarily set B3 to =TRUE() and expect 165. Set B2 to 20 and expect 285. Restore B2 to 10 and B3 to =FALSE(); verify 120. These calculations establish a working model before an object is connected.
Save a native .gnumeric checkpoint. Leave D2:H8 empty for the controls so they do not cover inputs or results.
Add the Boolean option
- Choose View → Toolbars → Object Toolbar if that toolbar is hidden. Hover over its buttons to identify the Checkbox tool rather than guessing from an icon.
- Select Checkbox. With the placement crosshair over the sheet, drag a rectangle in the empty D2:H3 area.
- Right-click the checkbox object and choose Properties. In Checkbox Properties, set Link to: to
Plan!$B$3and Label: toInclude equipment (45). - Confirm with OK. Operate the checkbox, then inspect B3 as well as B7. Checked should give Boolean TRUE and 165 at 10 attendees; unchecked should give FALSE and 120.
- Inspect B7 in the formula entry area. It must still contain
=B2*B4+IF(B3,B5,0), not a Boolean or a typed total.
The reviewed implementation writes Boolean values on toggling. It is not a three-state approval workflow, electronic signature or record of who made a choice. The label is descriptive text: changing B5 does not automatically rewrite the label’s 45.
Add a whole-number quantity slider
Choose Slider on Object Toolbar and drag it into D5:H6. Open its object Properties and set:
| Control | Setting |
|---|---|
| Link to: | Plan!$B$2 |
| Direction | Horizontal |
| Min: | 0 |
| Max: | 20 |
| Increment: | 1 |
| Page: | 5 |
Confirm with OK. The 1.12.62 implementation uses integer configuration values and rounds the slider’s changed value to an integer before writing it. This example therefore uses attendee counts, not fractional prices or percentage rates. The slider does not display its value as a numeric label in that implementation; keep B2 visible.
Move the thumb and read B2. Test both endpoints, then restore B2 to 10 by operating the slider. If clicking the channel moves by the configured page increment on your installed build, check a five-attendee change as well; do not confuse Page with the maximum value. Exact mouse interaction remains a native acceptance check.
Use this matrix to verify the linked model:
| Attendees in B2 | B3 FALSE | B3 TRUE |
|---|---|---|
| 0 | 0 | 45 |
| 10 | 120 | 165 |
| 15 | 180 | 225 |
| 20 | 240 | 285 |
These are independent results from attendees × 12 + optional 45, not values captured from Gnumeric. At each state, confirm the actual two input cells, not merely the thumb position or checkbox appearance.
Recover from linking or selection errors
If clicking operates a widget when you meant to move it, right-click it, then dismiss the menu by clicking outside the menu. The manual describes this route for selecting interactive objects. Use the selected object’s border/handles to reposition it in the empty area, not its interactive thumb.
If B7 stops calculating, inspect each Link to: field. Restore the B7 formula and correct the links to B2/B3 before repeating the matrix. If a control has no effect, check the sheet name and absolute cell reference. Do not broaden the link to a range or put both controls on one cell.
A slider’s bounds are not cell validation or protection. A person can still try editing B2 directly through another entry route. This exercise does not establish validation, blank handling, protected-sheet interaction or export compatibility. Use restricted entries and dropdowns for the separate validation workflow.
Save, reopen and remove deliberately
Finish at 10 attendees, equipment unchecked: B2 10, B3 FALSE, B7 120. Save, close and reopen the .gnumeric workbook. Check both Properties links and repeat the 10-attendee toggle and 20-attendee endpoint tests. Saving alone does not establish that working controls survived.
In a disposable copy, right-click the slider object and choose Delete. B2 should retain its value and B7 its formula; manually changing B2 must still recalculate the result. Delete the checkbox object similarly and recheck B3/B7. Object deletion is not a reset-to-default operation, so restore input values explicitly when needed.
Keep the two objects apart. The older manual warns that widgets have incomplete features and stacking limitations; source inspection of these selected controls does not establish every widget or resolve all layout issues. No list-box, combo-box or cross-format support is claimed here. For storing named sets of assumptions rather than providing controls, see saved scenarios.
Official evidence
- GUI widgets and graphical object selection and manipulation: documented placement, context menus and selection workflow.
- Toolbar visibility: showing and hiding toolbars, not arbitrary button customization.
- Official Gnumeric 1.12.62 source:
src/sheet-object-widget.csupplies toggle writes, integer slider writes and configuration handlers;src/dialogs/so-checkbox.uiandso-scrollbar.uisupply fields;src/wbc-gtk.c,wbc-gtk-actions.candGNOME_Gnumeric-gtk.xmlsupply toolbar labels and commands. Implementation review supports the procedure but does not replace native testing.