[GH-ISSUE #839] Feature request: radio buttons #610

Open
opened 2026-03-04 01:06:26 +03:00 by kerem · 0 comments
Owner

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.)

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.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#610
No description provided.