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

Dialog: Emit focusin and focusout signals #57

Open tbabej opened 3 years ago

tbabej commented 3 years ago

Emit signals on change of focus to enable hooking handlers for focusin and focusout events on particular widgets.

pfalcon commented 3 years ago

Thanks, but why?

tbabej commented 3 years ago

In my particular case, I am designing a dialog where "hovering" over a particular checkbox should display help text explaining that particular choice in more detail - which is implemented through a label text.

pfalcon commented 3 years ago

Thanks for explanation, that indeed may be useful in some cases. But there's no real mouse "hovering" in TUI (usually), and there's other known patterns to achieve that functionality (e.g. pressing F1 in a field to get a help dialog). So, I'm marking this as a "contrib", so the people interested in this functionality could add/pick it up.

pfalcon commented 3 years ago

Btw, I'm planning to make some backwards-incompatible changes: https://github.com/pfalcon/picotui/issues/59. Feedback whether that should be 1.3/1.4 or 2.0 is welcome.