[GH-ISSUE #430] Fixed TextView on Grid #315

Closed
opened 2026-03-04 01:03:52 +03:00 by kerem · 2 comments
Owner

Originally created by @xidod on GitHub (Apr 12, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/430

Hello, I have a Grid with some primitive that needs resize but one primitive no, it is a TextView with banner on top left of the terminal with indentation and if I resize the window also the banner in the TextView resize it self and the layout of the banner is destroyed.
Since the Application can hold only one primitive, is possible to have a primitive inside a grid not resizable? Or at least a workaround to this scenario?

Thank you.

Originally created by @xidod on GitHub (Apr 12, 2020). Original GitHub issue: https://github.com/rivo/tview/issues/430 Hello, I have a Grid with some primitive that needs resize but one primitive no, it is a TextView with banner on top left of the terminal with indentation and if I resize the window also the banner in the TextView resize it self and the layout of the banner is destroyed. Since the Application can hold only one primitive, is possible to have a primitive inside a grid not resizable? Or at least a workaround to this scenario? Thank you.
kerem closed this issue 2026-03-04 01:03:52 +03:00
Author
Owner

@rivo commented on GitHub (Apr 14, 2020):

I'm not exactly sure I understand your explanation but you can set fixed sizes on grid elements with the Grid.SetColumns() and Grid.SetRows() functions.

If this doesn't answer your question, please provide a screenshot or something that illustrates what you would like to achieve.

<!-- gh-comment-id:613394006 --> @rivo commented on GitHub (Apr 14, 2020): I'm not exactly sure I understand your explanation but you can set fixed sizes on grid elements with the [Grid.SetColumns()](https://pkg.go.dev/github.com/rivo/tview?tab=doc#Grid.SetColumns) and [Grid.SetRows()](https://pkg.go.dev/github.com/rivo/tview?tab=doc#Grid.SetRows) functions. If this doesn't answer your question, please provide a screenshot or something that illustrates what you would like to achieve.
Author
Owner

@xidod commented on GitHub (Apr 14, 2020):

Grid.SetColumns() is exactly what I need.
Thank you!

<!-- gh-comment-id:613628102 --> @xidod commented on GitHub (Apr 14, 2020): [Grid.SetColumns()](https://pkg.go.dev/github.com/rivo/tview?tab=doc#Grid.SetColumns) is exactly what I need. Thank you!
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#315
No description provided.