Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using widgets for simple console interaction without using entire screen, is that possible? #912

Open
elsni opened this issue Nov 5, 2023 · 1 comment

Comments

@elsni
Copy link

elsni commented Nov 5, 2023

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?

@rivo
Copy link
Owner

rivo commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants