When a highlighter is used instead of a cursor it looks much better when all the options have the same length. With right_pad_options all options are right-padded with spaces so they have the same length. Also, an example for a cursorless menu is added.cursorless
padre
7a09d45ab8
commit
775c50ed6f
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
from clintermission import CliMenu, CliMenuTheme
|
||||
|
||||
|
||||
q = ["Foo", "Bar", "Baz baz baz baz baz"]
|
||||
m = CliMenu(q, "Time to choose:\n", style=CliMenuTheme.BOLD_HIGHLIGHT,
|
||||
cursor='', option_prefix=' ', option_suffix=' ', right_pad_options=True)
|
||||
m.get_selection()
|
||||
print("You selected", m.get_selection())
|
Cargando…
Referencia en una nueva incidencia