mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #850] padding getting ignored #620
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#620
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 @tcurdt on GitHub (May 20, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/850
I am trying to create a horizontal flex but want to control the spacing between the components.
This results in the following:
ddddddddddda1ab2bbut want I want is:
ddddddddd a1a b2bI have experimented with with the flex item width and the various paddings but I somehow must be missing something.
What I ended up doing:
Is that a horrible workaround or the intend way of using the API?
@rivo commented on GitHub (Jun 18, 2023):
No, this is not a horrible workaround.
Flexdoesn't have a built-in way to add spacing between items. So adding anilitem is perfectly fine and it will give you precise control over how much spacing you want to add.Alternatively, you could use
Gridwith one row and define extra columns where you don't place any elements.The "border padding" you tried to add before only affects the inside of a primitive. It's the space between the primitive's content and its border (if there is one).