mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #747] Allow overriding border runes per instance of Box #548
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#548
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?
Originally created by @moson-mo on GitHub (Jul 23, 2022).
Original GitHub issue: https://github.com/rivo/tview/issues/747
Borders of focused elements are drawn differently than for unfocused ones (thicker / double lines).
Would be nice if there is a method to control that behavior.
While it's possible to override the runes that are used for focused elements globally, one might want to have this for specific boxes/containers only.
The only way to work around it is to use SetDrawFunc and draw the borders yourself I guess?
I'm thinking about a boolean likeborderIgnoreFocusadded to the Box struct with a methodSetBorderIgnoreFocus(ignore bool)which can then be checked in theDrawForSubclasshttps://github.com/rivo/tview/issues/747#issuecomment-1198967978
@moson-mo commented on GitHub (Jul 29, 2022):
This assumes you use your own primitives though, or I'm missing something 🤔
I want to be able to override what characters are used to print the borders per instance (not type) of a component. Also the built-in ones.
E.g. you have 5 nested
Flexcomponents. For the top 3, I want to print single borders.This would make it possible:
github.com/moson-mo/tview@2571a960abExample:
Don't know if this has a chance of being merged ?
@rivo commented on GitHub (Aug 11, 2022):
This is a bit like #692. It looks like everybody wants something different for their borders.
I'm planning to add more general customization options for primitives that will go beyond a simple "change the code points used to draw a border". (It's one of the major features that have been requested a lot.) But it'll have to wait. Currently, I'm working on a text area which was by far voted as most important and it's a major project on its own.
@golangdojo99 commented on GitHub (Sep 27, 2022):
@rivo, any updates on adding this?