mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #839] Feature request: radio buttons #610
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#610
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AdamNorberg on GitHub (Apr 9, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/839
Radio buttons, checkbox-like items presented in a group where at most one item can be checked at once (often, exactly one item must be checked), are common in desktop UI widget kits. Its omission is notable here. I'm considering using tview for an unserious personal project and would need radio buttons.
I've started implementing radio buttons (and radio button groups) on top of Checkbox in a fork: https://github.com/AdamNorberg/tview/tree/radio-buttons . I have not yet written demo code or stabilized it. I'll continue with this if my approach so far is at least somewhat acceptable and there is interest by the project owner.
(The most questionable detail of my implementation is probably the implementation of the "stay checked" behavior, which just goes back and re-checks the unchecked item, skipping user-provided callbacks for both.)