Skip to content
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

Q: spreadsheet-like input from a table #78

Closed
glycerine opened this issue Mar 14, 2018 · 5 comments
Closed

Q: spreadsheet-like input from a table #78

glycerine opened this issue Mar 14, 2018 · 5 comments

Comments

@glycerine
Copy link

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
Copy link
Owner

rivo commented Mar 14, 2018

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

Let me know if that helps.

@glycerine
Copy link
Author

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
Copy link
Author

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

@rivo
Copy link
Owner

rivo commented 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.

@glycerine
Copy link
Author

Thanks @rivo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants