[GH-ISSUE #78] Q: spreadsheet-like input from a table #60

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

Originally created by @glycerine on GitHub (Mar 14, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/78

I have a bunch of rows in a table, and I'd like to have two columns of input at the end.

Is there at present a way to enter values into the cells of a table? Table seems to have a double slice of concrete *TableCell, not an primitive interface, so I'm thinking not.

Suggestions for how to design this?

Thank you.

Jason

Originally created by @glycerine on GitHub (Mar 14, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/78 I have a bunch of rows in a table, and I'd like to have two columns of input at the end. Is there at present a way to enter values into the cells of a table? Table seems to have a double slice of concrete *TableCell, not an primitive interface, so I'm thinking not. Suggestions for how to design this? Thank you. Jason
kerem closed this issue 2026-03-04 01:01:32 +03:00
Author
Owner

@rivo commented on GitHub (Mar 14, 2018):

Please have a look at #46. This might be what you are looking for.

Let me know if that helps.

<!-- gh-comment-id:372921573 --> @rivo commented on GitHub (Mar 14, 2018): Please have a look at #46. This might be what you are looking for. Let me know if that helps.
Author
Owner

@glycerine commented on GitHub (Mar 15, 2018):

Cool. I made that work with my hierarchy. Thanks!

It feels a little hacky, but meh. It seems almost like a "sheet" should be its own kind of widget -- since spreadsheets like things come up so often. In the spirit of YAGNI, I don't want to do extra work. Especially when things mouse support are on potentially being developed.

By the by, is mouse support super tricky? Just curious how hard that looks to be.

<!-- gh-comment-id:373227655 --> @glycerine commented on GitHub (Mar 15, 2018): Cool. I made that work with my hierarchy. Thanks! It feels a little hacky, but meh. It seems almost like a "sheet" should be its own kind of widget -- since spreadsheets like things come up so often. In the spirit of YAGNI, I don't want to do extra work. Especially when things mouse support are on potentially being developed. By the by, is mouse support super tricky? Just curious how hard that looks to be.
Author
Owner

@glycerine commented on GitHub (Mar 15, 2018):

I'll close this and comment over on the mouse issue.

<!-- gh-comment-id:373279904 --> @glycerine commented on GitHub (Mar 15, 2018): I'll close this and comment over on the mouse issue.
Author
Owner

@rivo commented on GitHub (Mar 15, 2018):

This comment comes up in other conversations, too (e.g. #64), where users want to edit text with the TextView. I'm offering the tools to potentially implement something more complex but I'm not planning on putting a fully featured text editor or spreadsheet into tview.

Mouse support is probably not hard but it affects all primitives so I have to take some time to think about it and implement it. The easiest case is to use clicks simply to set a primitive's focus. But obviously, in your case that's not enough: You'll want Table cells to be selected on mouse clicks. Most of the work is coming up with a consistent architecture. I just haven't gotten around to it yet.

<!-- gh-comment-id:373301078 --> @rivo commented on GitHub (Mar 15, 2018): This comment comes up in other conversations, too (e.g. #64), where users want to edit text with the `TextView`. I'm offering the tools to potentially implement something more complex but I'm not planning on putting a fully featured text editor or spreadsheet into `tview`. Mouse support is probably not hard but it affects all primitives so I have to take some time to think about it and implement it. The easiest case is to use clicks simply to set a primitive's focus. But obviously, in your case that's not enough: You'll want `Table` cells to be selected on mouse clicks. Most of the work is coming up with a consistent architecture. I just haven't gotten around to it yet.
Author
Owner

@glycerine commented on GitHub (Mar 15, 2018):

Thanks @rivo.

<!-- gh-comment-id:373326786 --> @glycerine commented on GitHub (Mar 15, 2018): Thanks @rivo.
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#60
No description provided.