New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change List border to single line #933
Comments
@abitrolly reference borders.go for the changeable border sections tview.Borders.HorizontalFocus = tview.BoxDrawingsHeavyHorizontal
tview.Borders.VerticalFocus = tview.BoxDrawingsHeavyVertical
tview.Borders.TopLeftFocus = tview.BoxDrawingsHeavyDownAndRight
tview.Borders.TopRightFocus = tview.BoxDrawingsHeavyDownAndLeft
tview.Borders.BottomLeftFocus = tview.BoxDrawingsHeavyUpAndRight
tview.Borders.BottomRightFocus = tview.BoxDrawingsHeavyUpAndLeft reference semigraphics.go for the border graphic names you can use The ability to set specific borders on individual widgets is not available in the current Anyhow that link should give you a starting point to hack in the ability for setting different border styles per primitive/widget/box |
Thanks for the confirmation that Nice to see that it is already implemented in the fork. I think https://github.com/digitallyserviced/tview/blob/digitally/borders.go#L5 I guess it is even possible to preserve existing properties of |
Found #747 with the request to dynamically set border rules. |
I wish I could give you some promising news about it being avialable in original tview, but I gave up trying to make PR's for many of the changes I've done to my fork (there's a lot). You can also see that Here is a bit of a preview of my own app using my tview fork's differences. |
@abitrolly If you were looking for more detailed styling support. My app uses this for being able to define styles in textviews/anywhere you would do Also my tview-theming has support for a theme.toml to define strings and formatting in such a way to be watch/auto-reloaded when developing. https://github.com/digitallyserviced/tview-theming [FormatStrings]
badgeThreeLineField = '''[badgeText] [#303030:-] [:#505050]
[badgeText] [::r]%[1]s [:#303030:-] [#303030:-] [:#505050]
[badgeText] [#303030:-] [:#505050]'''
[TagStyles]
[TagStyles.badgeText]
Attributes = "b"
BG = "#303030"
FG = "magenta"
|
@digitallyserviced the biggest challenge in maintaining (public) libraries is to design interfaces in future compatible manner. Do not break things, and ensure that future extensibility is possible. I see that at least your As for your other changes, they don't seem to be related to single or double line problem. |
@digitallyserviced - You regularly promote your fork, and indeed you seem to have made a lot of improvements to it. But the problem is, it's a big bunch of undocumented changes. |
I never expected anyone to siwtch to it, which is why it's never actually advertised as something to do. rather it is a tool to reference and gain insight. I completely agree, ye sit's not ready for production or main-stream use. However, it is a useful tool fo gai insight, and ideas about how to go about doing things that aren't available currently, but with a bit of work and creativity, it can be implemented. in no way am i trying to foce or push my fork on anyone. Most of it is yes it undocumented, and while it may not be for the common user/layman, it has been quite helpful to others who have wanted to cherry pick additional goodies. My goal was never to replace, or make tview a competing framework, but rather as an example as the possibilities. I just dont have the time to polish. |
After calling
list.SetBorder(true)
(see the code below) the default width of https://pkg.go.dev/github.com/rivo/tview#List is double line.I want to change that to single line, but can't find the API. There are two functions that may do this, but it is not clear what parameters they get and what is the effect.
If changing the style is possible, an example would be appreciated.
The text was updated successfully, but these errors were encountered: