hbyint / lanterna

Automatically exported from code.google.com/p/lanterna
GNU Lesser General Public License v3.0
0 stars 0 forks source link

The table control could use a scroll bar #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently when the table cannot accomodate all rows in the screen I am seeing 
an exception similar to the one when adding a checkbox to a table fails. It 
would be useful if the table supported a scroll bar to run through the entries.

Original issue reported on code.google.com by m.vino...@gmail.com on 30 Jul 2012 at 5:36

GoogleCodeExporter commented 9 years ago
There should be some kind of component like the ScrollPane in Swing, but that's 
not easy to make.

Original comment by mab...@gmail.com on 31 Jul 2012 at 12:33

GoogleCodeExporter commented 9 years ago
The scroll that you added for the listbox works like a charm. How about 
generalizing that?

Original comment by m.vino...@gmail.com on 31 Jul 2012 at 12:49

GoogleCodeExporter commented 9 years ago
Personally I'd like to see a full ScrollPane implementation with support for a 
Header displaying column names

Original comment by bem...@gmail.com on 5 Sep 2012 at 4:38

GoogleCodeExporter commented 9 years ago
Yes, that would be nice... Maybe something for the next version, as I'm 
thinking of releasing 2.1.0 soon.

Original comment by mab...@gmail.com on 8 Sep 2012 at 2:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Indeed, I implemented my own scrolling table with header (see attached).
Important things that might matter to others:
- selectable rows (row selection indicator can span the whole row)
- sortable by passing a row comparator

My current implementation is quite hacky since most things in lanterna Table 
are private: I wrapped a lanterna Table inside a Panel and rebuild the whole 
table when scrolling! Table being internally column based makes the scrolling 
code slightly awkward, but hey it works and looks good ;)

Original comment by jul.bram...@gmail.com on 18 Feb 2014 at 11:11

Attachments:

GoogleCodeExporter commented 9 years ago
I've added it to the todo-list for 3.0

Original comment by mab...@gmail.com on 30 Mar 2014 at 12:49