Artefacts on screen
chemax opened this issue · comments
My gist
Hi.
- Thank you for great lib.
- Can someone help me, maybe, please. When I try to recreate table in my grid, I have some artifacts. How I can fix it?
I'm attach my code and video example.
Please, help)
WindowsTerminal_X3zyWm0VHr.mp4
The gist is not a complete runnable. It is difficult to test.
Wrap any screen changes/updates in the app.QueueUpdateDraw(func(){})
handler so that the screen updates happen on the main UI thread and the re-draw is called.
The gist is not a complete runnable. It is difficult to test.
Wrap any screen changes/updates in the
app.QueueUpdateDraw(func(){})
handler so that the screen updates happen on the main UI thread and the re-draw is called.
Thank you for help and sorry for my bad example. I will try to create runnable example some later.
I was try to execute QueueUpdateDraw, but my app just frozen, when I try it like this:
t.App.QueueUpdateDraw(func() {
grid.AddItem(secretsTable, 1, 1, 1, 1, 0, 100, true)
})
app.Sync() solve my problem. Thank you for tview.
t.App.QueueUpdateDraw(func() { grid.AddItem(secretsTable, 1, 1, 1, 1, 0, 100, true) })
If you are locking up when doing this, then make sure you are doing ALL your UI updates in the callback. Instead of say calling it for each additem, make sure you put your for
loops inside of the callback.