mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #143] How to force redraw primitives? #112
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#112
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 @kovart on GitHub (Jul 26, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/143
Does the lib updates only if the keyboard input is captured?
What about self-updatable primitives?
@rivo commented on GitHub (Jul 27, 2018):
Application.Draw()is called in response to a keyboard event because keyboard events typically lead to display changes.If you make changes to a primitive independently, and especially in separate goroutines, you'll need to call
Application.Draw()yourself. Some primitives give you tools to inform you that something has changed, for example theTextView"changed" event.Let me know if this answers your question.
@kovart commented on GitHub (Jul 28, 2018):
Yep. But, It could be better to call Draw method for specific primitive, or not?
@rivo commented on GitHub (Jul 28, 2018):
It seems that way at first but (most of the time) it's not. There's a longer discussion in #128 which you'll want to read. Feel free to add to that discussion if you have valuable input.
I'll close this issue but will reopen if it turns out it's still an open item.