mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #555] Widgets inside a grid doesn't change focus when tab key is pressed #406
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#406
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 @jcbritobr on GitHub (Jan 24, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/555
The code below has a problem that the bunttons inside the grid doesn't change or receive focus when tab key is pressed:
windows 10 64, golang 1.15.5_64
I'm very new on tview, and I'm following the examples, but I think there are something wrong with this behavior.
@rivo commented on GitHub (Feb 17, 2021):
Your first button has the current focus (you can see that because it's white) so it receives keyboard input. The Tab key is not bound to any action on the buttons, however, so nothing happens. You can use
SetInputCapture()to implement the desired action for the buttons.Or if you really just want to have buttons in a horizontal layout, you could use
Formwith just buttons and no other fields. It implements button navigation with the Tab key.Let me know if this helps.
@jcbritobr commented on GitHub (Feb 17, 2021):
Hello. Thank you by the help. I1ll try here and will be back.