-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Style Option for Variables #252
Comments
im currently looking into how to do this as well. after much searching i found this: specificaly this part
notice the choices
so im guessing the other prompts would work the same? still trying to get it to work my side tho in my implementation of a menu system so results may vary. (ive tried many things already but this looks like it might just work) |
well.. it works.. wow - and im totaly dumb for not having realized what im reading over and over again.
altho im not sure if it helps you tho... since it says
|
Describe the problem
Right now we can only, from what I can find, format a handful of questionary options and they apply to entire questionary prompt. Which often contains dynamic variables from elsewhere in the script.
Describe the solution
I'd like to highlight these variables with a custom styling so they standout amongst the rest of the text. Example:
You ask a question where a previous answer needs to be inserted. I'd like to highlight this answer/variable:
custom_styled_variable = Style([("question, """)("variable", fg_color)])
highlight_me = questionary.text("What do you want highlighted in the next question").ask()
questionary.text(f"This is an example of {highlight_me}", style= 'custom_styled_variable')
Alternatives considered
Anything existing that already accomplishes this. I wasn't able to find it in documentation.
The text was updated successfully, but these errors were encountered: