Open CelestialCipher opened 1 year ago
Try wrapping your HSplit(buttons)
in a ScrollablePane
:
...
from prompt_toolkit.layout.scrollable_pane import ScrollablePane
...
root_container = VSplit(
[
ScrollablePane(HSplit(buttons)),
Window(width=1, char="|"),
Window(formatted_text)
],
padding=1
)
...
so I have this code
my problem is if I make the list bigger like
pets = ['dog', 'cat', 'parrot']*100
it fails and gives "Window is too small". So I want to add a scrollbar next to it which allows me to scroll through the buttons, how do I do that?