mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-07 11:02:09 +00:00
The Insert tab gains Button, Slider and Spin Button beside Cell Controls › Checkbox, which is unchanged. Each arms placement: a drag on the grid draws the control at that size (a tall drag makes a vertical slider), a click places it at its default size, and Escape disarms. Key tips (N B U, N S L, N S B) place one at the active cell. A new button opens Assign Action, as Excel opens Assign Macro. form_controls.rs draws the controls in the sheet tokens, so they look the same in both themes: buttons with hover and pressed states, sliders with a track, a filled part and a thumb (and the value beside the thumb while it is dragged), spin buttons with two arrows, stacked or side by side. A plain click works a control: dragging the thumb, clicking the track (a page), clicking or holding an arrow (it repeats after 0.4 s), pressing a button (it runs on release over it). A drag or a hold is one undo step. The control last worked takes the arrows, Page Up and Page Down, Home and End, and Space or Enter for a button. Ctrl or Cmd+click or a right-click selects a control to move or resize it; a right-click opens the object menu, which for a control adds Edit Text and Assign Action (buttons) and Format Control before Delete. Double-clicking a selected control opens its editor. On a right-to-left sheet a control moves as a whole and works where it is drawn. Assign Action runs a macro (from the list or typed, on the selection or a fixed range, with an optional output cell) or a command (searched among those a macro may run, with JSON parameters). Format Control edits the value, limits, incremental and page change, cell link, orientation, name and the locked and print flags, checking the same rules as the engine. A button whose action needs approval, or whose macro would write over data, asks in a prompt whose buttons press it again with the answer. New theme tokens (thumb, hover, pressed, fill, focus ring) are in the contrast test; Button, Slider and Spin icons are drawn in code; the new labels are translated in every interface language. The catalog gains Developer › Controls (280 / 296).