[PR #188] [CLOSED] Box should have an content Primitive #871

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

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/188
Author: @delaneyj
Created: 11/21/2018
Status: Closed

Base: masterHead: box-contets


📝 Commits (1)

📊 Changes

1 file changed (+15 additions, -0 deletions)

View changed files

📝 box.go (+15 -0)

📄 Description

The Box primitive is used in many examples (especially Flex) but once you start using it adding contents inside the Box is not straight forward without generating custom Primitives and .Draw() functions. This is an initial bare minimum implementation to support Box having a .SetContents(p Primitive).

This does not change how b.draw works but long term it may mean the need for a DrawFunc is unnecessary and allows for more composability.


🔄 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/188 **Author:** [@delaneyj](https://github.com/delaneyj) **Created:** 11/21/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `box-contets` --- ### 📝 Commits (1) - [`0cffbb0`](https://github.com/rivo/tview/commit/0cffbb02d84e47227fdd50dadf503204ae72262e) Initial implementation ### 📊 Changes **1 file changed** (+15 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `box.go` (+15 -0) </details> ### 📄 Description The Box primitive is used in many examples (especially `Flex`) but once you start using it adding contents inside the Box is not straight forward without generating custom `Primitives` and `.Draw()` functions. This is an initial bare minimum implementation to support Box having a `.SetContents(p Primitive)`. This does not change how `b.draw` works but long term it may mean the need for a `DrawFunc` is unnecessary and allows for more composability. --- <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:20 +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#871
No description provided.