[GH-ISSUE #384] Different border styles for different primitives #284

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

Originally created by @zmnpl on GitHub (Jan 11, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/384

Hi, not sure if it is a bug, intended, or just me missing some configuration options...

I do get different borders for different primitives. A form has a double line border, while a text view "only" has a single line. For a consistent experience I'd like to have them all use the same style. Is that something I can control through configuration?

border_form

newForm := tview.NewForm()

// add primitives

newForm.SetBorder(true).SetTitle("Add new game").SetTitleAlign(tview.AlignCenter)

border_license

license := tview.NewTextView().
SetDynamicColors(true).
SetRegions(true)
// add text
license.SetBorder(true).SetTitle("Credits / License")

Cheers!

Originally created by @zmnpl on GitHub (Jan 11, 2020). Original GitHub issue: https://github.com/rivo/tview/issues/384 Hi, not sure if it is a bug, intended, or just me missing some configuration options... I do get different borders for different primitives. A form has a double line border, while a text view "only" has a single line. For a consistent experience I'd like to have them all use the same style. Is that something I can control through configuration? ![border_form](https://user-images.githubusercontent.com/9001667/72201727-620c6500-3457-11ea-9426-ecebd041f1d8.png) ``` newForm := tview.NewForm() // add primitives newForm.SetBorder(true).SetTitle("Add new game").SetTitleAlign(tview.AlignCenter) ``` ![border_license](https://user-images.githubusercontent.com/9001667/72201846-959bbf00-3458-11ea-85a9-59e0020b3f72.png) ``` license := tview.NewTextView(). SetDynamicColors(true). SetRegions(true) // add text license.SetBorder(true).SetTitle("Credits / License") ``` Cheers!
kerem closed this issue 2026-03-04 01:03:37 +03:00
Author
Owner

@tslocum commented on GitHub (Jan 11, 2020):

Borders are drawn with a single line for non-focused, and a double line for focused primitives. See Box.Draw. Modifying Borders will allow you to achieve a consistent look.

<!-- gh-comment-id:573329370 --> @tslocum commented on GitHub (Jan 11, 2020): Borders are drawn with a single line for non-focused, and a double line for focused primitives. See [Box.Draw](https://github.com/rivo/tview/blob/1ee8d9874dcfca377e638a1572ef3718f416ee0d/box.go#L247). Modifying [Borders](https://github.com/rivo/tview/blob/29553e579468ab7602330e2e47e8c22fe6dbcd68/borders.go) will allow you to achieve a consistent look.
Author
Owner

@zmnpl commented on GitHub (Jan 11, 2020):

Focus ... I see :) Thank you for that!

<!-- gh-comment-id:573329547 --> @zmnpl commented on GitHub (Jan 11, 2020): Focus ... I see :) Thank you for that!
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#284
No description provided.