[GH-ISSUE #661] Border styling example on the Box page #485

Closed
opened 2026-03-04 01:05:24 +03:00 by kerem · 1 comment
Owner

Originally created by @abitrolly on GitHub (Oct 11, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/661

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.

Originally created by @abitrolly on GitHub (Oct 11, 2021). Original GitHub issue: https://github.com/rivo/tview/issues/661 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.
kerem closed this issue 2026-03-04 01:05:24 +03:00
Author
Owner

@rivo commented on GitHub (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.

<!-- gh-comment-id:963249287 --> @rivo commented on GitHub (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.
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#485
No description provided.