tabular data in listboxes and textviews
I’ve done a retake on tables or tabular data. The Table class with its MVC architecture and editability is a huge class. I wanted something small and simple. A tiny code base for just printing tables, no editing. No moving, hiding etc. Just simple throwing tabular data, letting a user scroll, select a row…
First I integrated the excellent terminal-table. However, I had to make changes to that gem, and that meant installation issues and keeping it up-to-date. So i’ve hacked a simple table display in a small file, which i can use for most table data. Easy to maintain, and easy to debug or modify!
I’ve attached it to a listbox and to a textview. I might give it its own simple widget which is aware of columns without getting into models, renderers etc. The syntax from terminal-table is supported, I’ve used their examples. It does not do colspan, and center alignment. Enjoy. Ruby rocks!