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

Border styling example on the Box page #661

Closed
abitrolly opened this issue Oct 11, 2021 · 1 comment
Closed

Border styling example on the Box page #661

abitrolly opened this issue Oct 11, 2021 · 1 comment

Comments

@abitrolly
Copy link
Contributor

https://github.com/rivo/tview/wiki/Box page is nice, but it could be better if it also listed how to style boxes.

How to make a box border single line instead of double line?
How to remove side borders and leave only the top with menu at the bottom?

If Box is not the right element to make bottom menus, then a link tp a proper element with explanation why Box is not good would be nice.

@rivo
Copy link
Owner

rivo commented Nov 8, 2021

How to make a box border single line instead of double line?

Boxes always have a single line if they don't have focus. Only boxes that currently have focus have double lines. (Only one box can have focus at a time.)

How to remove side borders and leave only the top with menu at the bottom?

There is no widget that provides this out of the box. There are some tools to implement something like that yourself. Check this out:

https://github.com/rivo/tview/wiki/Primitives

Long term, there are also plans to add more decoration options to the Box primitive (see the survey in #578). But at the moment, those are not available.

If you only need one menu on your page, you might want to place it into its own widget. TextView or Form may be a good fit for that. The presentation demo in the repo uses TextView together with text view regions.

@rivo rivo closed this as completed Feb 15, 2022
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