gizak / termui

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

Add an "Active" member for Block to allow "focusable" widgets #257

Open pdevine opened 4 years ago

pdevine commented 4 years ago

This change adds a new "Active" member to Block so that it can be used to tell whether a given widget is in focus or not. I added some examples to show how you can use it.

I wasn't sure if "Active" was the correct term here. GTK uses the term "Has Focus" which might be more appropriate.

This relates to #209