pfalcon / picotui

Lightweight, pure-Python Text User Interface (TUI) widget toolkit with minimal dependencies. Dedicated to the Pycopy project.
https://github.com/pfalcon/pycopy
MIT License
811 stars 70 forks source link

Fix to allow ListBox to also use signal changed. #15

Closed peterjschroeder closed 7 years ago

peterjschroeder commented 7 years ago

The signal change update was not working properly with ListBox. These 2 small changes fix that. I noticed self.choice is always 0 for this one. self.cur_line seems to be the right pointer.

pfalcon commented 7 years ago

Merged, thanks! The example also updated in https://github.com/pfalcon/picotui/commit/b3216ee4a715d635f52bc6c96c0b705818c13631.

peterjschroeder commented 7 years ago

You're welcome.

I am currently trying to figure out how to update the ListBox list depending on the state of a DropBox. Changing listbox.items and redrawing in a signal handler doesn't seem to update it.