mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #78] Q: spreadsheet-like input from a table #60
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#60
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 @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
@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.
@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.
@glycerine commented on GitHub (Mar 15, 2018):
I'll close this and comment over on the mouse issue.
@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 intotview.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
Tablecells 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.@glycerine commented on GitHub (Mar 15, 2018):
Thanks @rivo.