mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #912] Using widgets for simple console interaction without using entire screen, is that possible? #662
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#662
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 @elsni on GitHub (Nov 5, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/912
I would like to use widgets for fancy user interaction in small programs without using the whole screen.
like the screenshot below.

The screenshot is a montage, actually the whole screen is cleared and the menu is put in the upper left corner
(how) is it possible?
@rivo commented on GitHub (Nov 6, 2023):
I don't think
tviewcan be used without using the entire screen. It's based ontcellwhich is a library for full-screen applications.But if you're ok with using the entire screen, you'll want to use a
Pagescomponent at the root which contains your main text (I assume it's aTextView?) and yourListon top. Finding out where to place the list depends a bit on what your main component is. Again, if it's aTextView, theGetOriginalLineCount()andGetScrollOffset()functions might help.