[PR #348] [CLOSED] Table.SetFixedColumnsWidth(): keep columns width fixed when scrolling #920

Closed
opened 2026-03-04 01:08:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/348
Author: @cespedes
Created: 9/23/2019
Status: Closed

Base: masterHead: fixedColumnsWidth


📝 Commits (1)

  • 4a44464 Added SetFixedColumnsWidth() to Table to keep columns width fixed when scrolling

📊 Changes

2 files changed (+24 additions, -1 deletions)

View changed files

📝 demos/table/main.go (+1 -0)
📝 table.go (+23 -1)

📄 Description

Added a new method to Table, SetFixedWidth(), to calculate the maximum width of every column and maintaining it fixed, even if the displayed rows have smaller widths.

This will prevent the tables from changing columns width when scrolling.

This fixes issue #345


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rivo/tview/pull/348 **Author:** [@cespedes](https://github.com/cespedes) **Created:** 9/23/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fixedColumnsWidth` --- ### 📝 Commits (1) - [`4a44464`](https://github.com/rivo/tview/commit/4a44464076ef533dc0b666558a68f52ff0f5af62) Added SetFixedColumnsWidth() to Table to keep columns width fixed when scrolling ### 📊 Changes **2 files changed** (+24 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `demos/table/main.go` (+1 -0) 📝 `table.go` (+23 -1) </details> ### 📄 Description Added a new method to Table, SetFixedWidth(), to calculate the maximum width of every column and maintaining it fixed, even if the displayed rows have smaller widths. This will prevent the tables from changing columns width when scrolling. This fixes issue #345 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:34 +03:00
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#920
No description provided.