gizak / termui

Golang terminal dashboard
MIT License
13.11k stars 786 forks source link

Add listbox widget with scroll indicators #145

Closed pdevine closed 5 years ago

pdevine commented 7 years ago

Creates a ListBox widget which can be scrolled up/down with content indicators.

screen shot 2017-05-06 at 11 18 30 am

You can move the highlighted selection w/ the up/down keys.

matiux commented 6 years ago

Hi, thanks for you branch. Can I use more than one ListBox? For instance, if I have two LisBox, how can I decide in which list I want to move lines?

pdevine commented 6 years ago

Unfortunately there is no concept of focusable widgets in termui, so if you want to have two listboxes, you'll need to handle that yourself in your own code. It's pretty easy to do, but as your application gets more complex things may get out of hand.

Honestly I'd forgotten about this code because it seems like the project is dead. Given the demand it seems like maybe we need to make a fork?

cjbassi commented 5 years ago

Hi, thanks for the PR. I decided to just add scrolling to the List widget instead of creating a new widget, but I did copy some of your features in, so thanks! And scrolling should now be working on master.