[GH-ISSUE #240] Border title for a group of Widgets #130

Closed
opened 2026-03-03 16:22:39 +03:00 by kerem · 4 comments
Owner

Originally created by @flaviostutz on GitHub (Jul 28, 2020).
Original GitHub issue: https://github.com/mum4k/termdash/issues/240

In our application we needed a way to group a bunch of widgets by a border title.
Is there a way to do this? How would I implement this feature in termdash?

Something like

image

Originally created by @flaviostutz on GitHub (Jul 28, 2020). Original GitHub issue: https://github.com/mum4k/termdash/issues/240 In our application we needed a way to group a bunch of widgets by a border title. Is there a way to do this? How would I implement this feature in termdash? Something like ![image](https://user-images.githubusercontent.com/7790172/88670072-046dfc00-d0bb-11ea-8997-a727313d0890.png)
kerem 2026-03-03 16:22:39 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@mum4k commented on GitHub (Jul 28, 2020):

Hello @flaviostutz, the way to do this in Termdash is to create a hierarchy of containers.

Create a top container with border. The top container will be the only one with a border.
Split the top container horizontally into two sub-containers.
Split each sub-container vertically into two sub-containers.
Place the widgets into the inner four subcontainers.

Splitting of containers to achieve layout is described in the wiki:
https://github.com/mum4k/termdash/wiki/Binary-tree-layout

Please let me know if you have any further questions.

<!-- gh-comment-id:665087554 --> @mum4k commented on GitHub (Jul 28, 2020): Hello @flaviostutz, the way to do this in Termdash is to create a hierarchy of containers. Create a top container with border. The top container will be the only one with a border. Split the top container horizontally into two sub-containers. Split each sub-container vertically into two sub-containers. Place the widgets into the inner four subcontainers. Splitting of containers to achieve layout is described in the wiki: https://github.com/mum4k/termdash/wiki/Binary-tree-layout Please let me know if you have any further questions.
Author
Owner

@flaviostutz commented on GitHub (Jul 28, 2020):

Thanks for the reply! I was searching exactly for this!

The example in the link you mentioned uses the "split" API. Do this works with "grid.RowHeightPerc" API too?

<!-- gh-comment-id:665133254 --> @flaviostutz commented on GitHub (Jul 28, 2020): Thanks for the reply! I was searching exactly for this! The example in the link you mentioned uses the "split" API. Do this works with "grid.RowHeightPerc" API too?
Author
Owner

@flaviostutz commented on GitHub (Jul 29, 2020):

I used the binary tree layout and all went well! Thanks!

<!-- gh-comment-id:665379717 --> @flaviostutz commented on GitHub (Jul 29, 2020): I used the binary tree layout and all went well! Thanks!
Author
Owner

@mum4k commented on GitHub (Jul 29, 2020):

Glad to hear it worked out, the grid layout is just a different abstraction and essentially achieves the same result. It may be a bit more complicated to achieve this with the grid layout, since the grid layout abstracts the intermediate containers and we need to set a border on one of them here.

The binary layout may be the best option to achieve this behavior.

<!-- gh-comment-id:665388321 --> @mum4k commented on GitHub (Jul 29, 2020): Glad to hear it worked out, the grid layout is just a different abstraction and essentially achieves the same result. It may be a bit more complicated to achieve this with the grid layout, since the grid layout abstracts the intermediate containers and we need to set a border on one of them here. The binary layout may be the best option to achieve this behavior.
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/termdash#130
No description provided.