[GH-ISSUE #282] Table Selection Inverts Cell Border Color #219

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

Originally created by @DuckDuckWhale on GitHub (May 18, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/282

After pasting code from Table Wiki, the enter key to select a cell inverts the cell border color as well as the content color.

Screenshot from Wiki

Screenshot

Originally created by @DuckDuckWhale on GitHub (May 18, 2019). Original GitHub issue: https://github.com/rivo/tview/issues/282 After pasting code from [Table Wiki](https://github.com/rivo/tview/wiki/Table), the enter key to select a cell inverts the cell border color as well as the content color. ### Screenshot from Wiki ![](https://github.com/rivo/tview/raw/master/demos/table/screenshot.png) ### Screenshot ![](https://user-images.githubusercontent.com/28813824/57973246-0e06ba80-7974-11e9-8637-27ff18d7d736.png)
kerem closed this issue 2026-03-04 01:03:05 +03:00
Author
Owner

@rivo commented on GitHub (Jun 2, 2019):

Good catch. The screenshot was still from a very old version of the Table class. It should match the demo now.

<!-- gh-comment-id:498049778 --> @rivo commented on GitHub (Jun 2, 2019): Good catch. The screenshot was still from a very old version of the `Table` class. It should match the demo now.
Author
Owner

@DuckDuckWhale commented on GitHub (Jun 3, 2019):

Okay, so inverting the color of the cell border is actually intended. What's the reasoning behind this though? Personally I actually think it looks nicer not to invert the cell border color. Is there any way to do that using the API?

<!-- gh-comment-id:498098107 --> @DuckDuckWhale commented on GitHub (Jun 3, 2019): Okay, so inverting the color of the cell border is actually intended. What's the reasoning behind this though? Personally I actually think it looks nicer not to invert the cell border color. Is there any way to do that using the API?
Author
Owner

@rivo commented on GitHub (Jun 9, 2019):

You can select multiple rows or multiple columns. In those cases also, the highlight must run across cell borders. (Anything else would look weird; I tested that.) Personally, I don't like having borders highlighted in some places and not in others so this is what I ended up with. Apart from rolling your own selection functionality (using GetInputCapture() and colour tags), there's currently no way to turn this off.

<!-- gh-comment-id:500212845 --> @rivo commented on GitHub (Jun 9, 2019): You can select multiple rows or multiple columns. In those cases also, the highlight must run across cell borders. (Anything else would look weird; I tested that.) Personally, I don't like having borders highlighted in some places and not in others so this is what I ended up with. Apart from rolling your own selection functionality (using [`GetInputCapture()`](https://godoc.org/github.com/rivo/tview#Box.GetInputCapture) and colour tags), there's currently no way to turn this off.
Author
Owner

@DuckDuckWhale commented on GitHub (Jun 12, 2019):

Fair enough.

<!-- gh-comment-id:501111288 --> @DuckDuckWhale commented on GitHub (Jun 12, 2019): Fair enough.
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#219
No description provided.