mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #713] NewGrid() doesn't draw items when called inside AddPage() #520
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#520
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 @ivdok on GitHub (Mar 17, 2022).
Original GitHub issue: https://github.com/rivo/tview/issues/713
Subj. Examples are unclear and confusing about how to stuff primitives in a grid. Consider this example:
When executed, after passing the first page I'm only greeted with primitives spawned by newPrimitive(). What gives? And where can I find more examples and support to use this library?
@rivo commented on GitHub (Apr 15, 2022):
This is an open source project. You're free to contribute examples if you find that they will improve the documentation. If you want to contribute to the Wiki https://github.com/rivo/tview/wiki, feel free to submit Markdown code in an issue.
Regarding your code, there are a bunch of issues. For example, you're not resizing the
Pagescomponent to full-screen so theminWidthcutoff of100will cause two grid boxes to disappear. Also, some of your components in your grid are overlapping. And finally, functions such asSetTitle()orSetBorder()will return aBoxand not aListso only a box will be drawn. Here's the same code with some fixes: