[GH-ISSUE #912] Using widgets for simple console interaction without using entire screen, is that possible? #662

Open
opened 2026-03-04 01:06:52 +03:00 by kerem · 1 comment
Owner

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
image

(how) is it possible?

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 ![image](https://github.com/rivo/tview/assets/1834504/bf9333bc-9c1b-4042-b324-d0992b8cd799) (how) is it possible?
Author
Owner

@rivo commented on GitHub (Nov 6, 2023):

I don't think tview can be used without using the entire screen. It's based on tcell which is a library for full-screen applications.

But if you're ok with using the entire screen, you'll want to use a Pages component at the root which contains your main text (I assume it's a TextView?) and your List on top. Finding out where to place the list depends a bit on what your main component is. Again, if it's a TextView, the GetOriginalLineCount() and GetScrollOffset() functions might help.

<!-- gh-comment-id:1795472957 --> @rivo commented on GitHub (Nov 6, 2023): I don't think `tview` can be used without using the entire screen. It's based on [`tcell`](https://github.com/gdamore/tcell) which is a library for full-screen applications. But if you're ok with using the entire screen, you'll want to use a `Pages` component at the root which contains your main text (I assume it's a `TextView`?) and your `List` on top. Finding out where to place the list depends a bit on what your main component is. Again, if it's a `TextView`, the [`GetOriginalLineCount()`](https://pkg.go.dev/github.com/rivo/tview#TextView.GetOriginalLineCount) and [`GetScrollOffset()`](https://pkg.go.dev/github.com/rivo/tview#TextView.GetScrollOffset) functions might help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#662
No description provided.