petereon / beaupy

A Python library of interactive CLI elements you have been looking for
https://petereon.github.io/beaupy/
MIT License
200 stars 13 forks source link

Possibility to underline current option in select_multiple #67

Closed juxeii closed 1 year ago

juxeii commented 1 year ago

Hi,

would it be much work to underline the current option in select_multiple which is chosen with the up/down keys? I have pre-colored some options red and some blue. And the third color green is for the current selected option. But this hides the pre-color. So, instead of specifying a selection-color, it may make sense to underline the current option. This way, the user would always see the pre-colors(which my represent different semantics).

petereon commented 1 year ago

Hi @juxeii

If I understand your requirement correctly, setting cursor_style='underline' should cover your use-case.

juxeii commented 1 year ago

That is exactly what I need, thx! Is there a comprehensive list of all the options available? I thought that only colors would be allowed.

petereon commented 1 year ago

Glad it worked!

Is there a comprehensive list of all the options available?

Yes, you can refer to Styles section of rich documentation. Note that currently only default "string represented styles" are supported (not Theme or Style objects). I plan to support that in the future.

juxeii commented 1 year ago

Thank you!