mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #1075] Redrawing the screen within SetFocusFunc or SetSelectionChangedFunc #779
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#779
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 @lhs616 on GitHub (Feb 24, 2025).
Original GitHub issue: https://github.com/rivo/tview/issues/1075
I created two tables and set the focus to true on the first table. When I press the bottom button of the keyboard in the last row of the first table, the focus is set to the second table and I want to use the event in the second table. When the focus changes, I want to change the color of the table with focus True. Previously, I managed the table's ROW cursor as a separate variable, and when a keyboard event occurred, I managed the cursor variable in the SetInputCapture function, and when drawing the table, I drew it again using the Select() function and then drew it using the SetRoot method. However, since I wanted to utilize the Row, Col values managed by the tableView, I tried to use the SetFocusFunc or SetSelectionChangedFunc function when the event occurred. The focus movement behavior works well, but when I Draw or SetRoot the screen again, a DeadLock occurs or the screen freezes. Is there no way to change the screen design in SetFocusFunc or SetSelectionChangedFunc and then draw the screen again?
`