[GH-ISSUE #833] padding reveals an area without background color #608

Open
opened 2026-03-04 01:06:25 +03:00 by kerem · 3 comments
Owner

Originally created by @tcurdt on GitHub (Apr 6, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/833

Unfortunately setting a padding reveals an area where I cannot set a background color.
Here the left and right padding is just white instead of black.

Screenshot 2023-03-26 at 18 19 30

Why isn't the background color being used?

Originally posted by @tcurdt in https://github.com/rivo/tview/issues/831#issuecomment-1484148541

Originally created by @tcurdt on GitHub (Apr 6, 2023). Original GitHub issue: https://github.com/rivo/tview/issues/833 Unfortunately setting a padding reveals an area where I cannot set a background color. Here the left and right padding is just white instead of black. <img width="176" alt="Screenshot 2023-03-26 at 18 19 30" src="https://user-images.githubusercontent.com/13697/227789413-862eec2f-fc30-40a4-8eef-7e61cec8d1a5.png"> Why isn't the background color being used? _Originally posted by @tcurdt in https://github.com/rivo/tview/issues/831#issuecomment-1484148541_
Author
Owner

@rivo commented on GitHub (Jun 18, 2023):

I tried to reproduce this but couldn't. Please post a small code snippet that reproduces this issue.

<!-- gh-comment-id:1596112023 --> @rivo commented on GitHub (Jun 18, 2023): I tried to reproduce this but couldn't. Please post a small code snippet that reproduces this issue.
Author
Owner

@tcurdt commented on GitHub (Jul 3, 2023):

Here is a snippet from the code.

...
	layoutCol2 := tview.NewFlex().
		SetDirection(tview.FlexRow).
		AddItem(identificationTextview, 3, 0, false).
		AddItem(valueInput, 1, 0, false).
		AddItem(detailsTextview, 6, 0, false)
	layoutCol2.SetBorder(true)
	layoutCol2.SetBorderPadding(0, 0, 1, 1)

...

	layoutControl := tview.NewFlex().
		SetDirection(tview.FlexColumn).
		AddItem(layoutCol1, 50, 0, false).
		AddItem(layoutCol2, 23, 0, false).
		AddItem(layoutCol3, 0, 1, false).
		AddItem(layoutCol4, 40, 0, false)

...

Let me know if that already helps.
Otherwise I need to try and extract the problem somehow.

<!-- gh-comment-id:1618906481 --> @tcurdt commented on GitHub (Jul 3, 2023): Here is a snippet from the code. ``` ... layoutCol2 := tview.NewFlex(). SetDirection(tview.FlexRow). AddItem(identificationTextview, 3, 0, false). AddItem(valueInput, 1, 0, false). AddItem(detailsTextview, 6, 0, false) layoutCol2.SetBorder(true) layoutCol2.SetBorderPadding(0, 0, 1, 1) ... layoutControl := tview.NewFlex(). SetDirection(tview.FlexColumn). AddItem(layoutCol1, 50, 0, false). AddItem(layoutCol2, 23, 0, false). AddItem(layoutCol3, 0, 1, false). AddItem(layoutCol4, 40, 0, false) ... ``` Let me know if that already helps. Otherwise I need to try and extract the problem somehow.
Author
Owner

@tcurdt commented on GitHub (Jul 3, 2023):

@digitallyserviced So far it feels a little unintuitive having to bother with this though.

<!-- gh-comment-id:1619178831 --> @tcurdt commented on GitHub (Jul 3, 2023): @digitallyserviced So far it feels a little unintuitive having to bother with this though.
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#608
No description provided.