[GH-ISSUE #1119] Set ItemPaddings to 0 in Form will make buttons disappears #813

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

Originally created by @ydzhou on GitHub (Sep 12, 2025).
Original GitHub issue: https://github.com/rivo/tview/issues/1119

Inside a flex, with other component presenting, if I set ItemPadding to 0, the buttons are no longer visible. Once I change this value to something greater than 0, buttons show up again.

Example code

        buttons := tview.NewForm().SetItemPadding(0).AddButton("A", func(){
        }).AddButton("B", func(){
        }).AddButton("C", func(){
        })
        table := tview.NewTable()
        table.SetBorder(true)
        flex := tview.NewFlex().SetDirection(tview.FlexRow).AddItem(buttons, 3, 1, false).AddItem(table, 0, 10, true)
        flex.SetBorder(true)

This code will give a output with an empty row(space) and a table frame below it.

Originally created by @ydzhou on GitHub (Sep 12, 2025). Original GitHub issue: https://github.com/rivo/tview/issues/1119 Inside a flex, with other component presenting, if I set ItemPadding to 0, the buttons are no longer visible. Once I change this value to something greater than 0, buttons show up again. Example code ``` buttons := tview.NewForm().SetItemPadding(0).AddButton("A", func(){ }).AddButton("B", func(){ }).AddButton("C", func(){ }) table := tview.NewTable() table.SetBorder(true) flex := tview.NewFlex().SetDirection(tview.FlexRow).AddItem(buttons, 3, 1, false).AddItem(table, 0, 10, true) flex.SetBorder(true) ``` This code will give a output with an empty row(space) and a table frame below it.
kerem closed this issue 2026-03-04 01:07:55 +03:00
Author
Owner

@rivo commented on GitHub (Sep 27, 2025):

Thanks for reporting this. The latest commit fixes this issue.

<!-- gh-comment-id:3341614689 --> @rivo commented on GitHub (Sep 27, 2025): Thanks for reporting this. The latest commit fixes this issue.
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#813
No description provided.