Python Forum
Option dropdown with Pyinquerer - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: Option dropdown with Pyinquerer (/thread-25175.html)



Option dropdown with Pyinquerer - julio2000 - Mar-22-2020

[Image: 54984836-f9c7c200-4faf-11e9-9d0e-d2512fc73e7f.png]

I want to create something like this. A option dropdown with those white lines inbetween options, to make it more clear.
This is my code untill now. I'd like to have that white line between 'Quick task' and 'Manage profiles'. I've currently done it like this. But atm, you can also select the option of those white lines, wich i don't want to be possible. So how do i add those white lines inbetween options, without those lines being a option to choose?
style = style_from_dict({
    Token.QuestionMark: '#0533ff bold',
    #Token.Selected: '#05fbff bold',
    Token.Answer: '#05fbff bold',
    Token.Question: '#05fbff bold',
})

questions = [{'type': 'list', 'name': 'Available', 'message': 'Available options: ', 'choices': ['Launch tasks', 'Quick task', '---------------', 'Manage profiles', 'Manage settings', 'Supported sites', 'Submit a suggestion', 'Close the bot']} ,]
answers = prompt(questions, style=style)