Browse Source

Add theme example

Sebastian Lohff 2 months ago
parent
commit
3d1d2d5acd
1 changed files with 16 additions and 0 deletions
  1. 16
    0
      examples/theme1.py

+ 16
- 0
examples/theme1.py View File

@@ -0,0 +1,16 @@
1
+#!/usr/bin/env python3
2
+from clintermission import CliMenu, CliMenuTheme
3
+
4
+
5
+def main():
6
+    q = ["Foo", "Bar", "Baz baz baz baz baz"]
7
+    m = CliMenu(q, "Time to choose:\n", style=CliMenuTheme.BOLD_HIGHLIGHT)
8
+
9
+    if m.success:
10
+        print("You selected", m.get_selection())
11
+    else:
12
+        print("You aborted the selection")
13
+
14
+
15
+if __name__ == '__main__':
16
+    main()

Loading…
Cancel
Save