mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[PR #62] [CLOSED] Expandable column #850
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#850
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?
📋 Pull Request Information
Original PR: https://github.com/rivo/tview/pull/62
Author: @dmke
Created: 2/28/2018
Status: ❌ Closed
Base:
master← Head:expandable-column📝 Commits (4)
fb6fa2eadd Table.SetExpandable for dynamic column widthd3025fbdemo/presentation: show Table.SetExpandablea8999a4demo/presentation: extract table reset codea934652reworked calculation for expandable column width📊 Changes
2 files changed (+91 additions, -33 deletions)
View changed files
📝
demos/presentation/table.go(+57 -27)📝
table.go(+34 -6)📄 Description
I've added a bit of code to mark a column as "expandable", i.e. to use the remaining horizontal space, effectively making any table a full-width table.
My use case is
multiping, which should align the statistic column on the right, and the host information on the left (kind of likemtr)For now, only one column can be made "expandable", but the API could later be upgraded to
func (t *Table) SetExpandable(columns ...int) *Tableto allow sharing the remaining space between multiple columns.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.