tmbo / questionary

Python library to build pretty command line user prompts ✨Easy to use multi-select lists, confirmations, free text prompts ...
MIT License
1.57k stars 90 forks source link

Need Help in SELECTING Option #338

Closed MarkFlyer closed 11 months ago

MarkFlyer commented 12 months ago

Question

Hey, is it possible for me to create a styled select option with a background color so that when the pointer moves up and down, the background moves along with the arror in the options?

What have you already tried?

I tried to make a code but i faild

Read the documentation

weiduhuo commented 11 months ago

Like this:

from questionary import Style
import questionary

my_style = Style([
    ("highlighted", "fg:#FF9D00 reverse")
])

option = None
for __ in range(3):
    option = questionary.select("Title:", ["One", "Two", "Three"], default=option, style=my_style).ask()

2023-11-23-3410

MarkFlyer commented 11 months ago

Thank you so MUCH