mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #72] An empty row in the bottom of flex/grid? #54
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#54
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 @lesovsky on GitHub (Mar 11, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/72
Hi,
I have a layout described in the code below, and it have one thing which I can't remove - this is an empty line after flex primitive (which is consists of two textviews). Just compare two screenshots:

The first one is built with
tview, and second one is the original interface built withncurses. Using tview's flex or grid primitive, I've got an empty line before next primitive -- see it betweenMiB swapandcmd: unknown commandlines. In the original interface, there is completely borderless interface with no empty lines.How to remove this empty line?
I understand this is a stupid question and it seems very simple, and perhaps I doing things wrong, but I played a lot with primitives and can't solve my problem.
@rivo commented on GitHub (Mar 11, 2018):
You're setting a fixed height of
5lines for your header:If you set it to
4, the extra line will disappear.@lesovsky commented on GitHub (Mar 11, 2018):
yep, it's the first thing which I did, but after that the primitive shifts up, the first row disappears and empty line still exists.

@rivo commented on GitHub (Mar 11, 2018):
That's because the
TextViewwill scroll with the content. Either remove the last newline:or call
sys.ScrollToBeginning()after printing to theTextView.@lesovsky commented on GitHub (Mar 11, 2018):
Thanks for explanation. My mistake, I must be more careful with
Println().