mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #362] SetBackgroundColor draws over grid #268
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#268
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 @ghost on GitHub (Oct 31, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/362
When i set the background color after creating a grid, the entire terminal gets the color and i can't see the grid anymore.
Seizing the opportunity. I'm learning programming right now and i started with Go and tview. I made a function that lists all the songs in a folder, prints and play the songs in sequence. How do i execute this function inside the songList primitive in this grid? I want the song list printed there.
Thanks!
@rivo commented on GitHub (Nov 27, 2019):
SetBackgroundColor()is a function ofBoxand it will return an instance ofBoxso yourgridvariable is not aGrid. This means that only the grid's super class (Box) will be drawn. It's empty so you don't see anything. You should callSetBackgroundColor()separately:Regarding your other question, you can write to a
TextViewat any time:See also
SetChangedFunc()for some information on how to deal with that.Let me know in case there's anything else that needs clarification.