How to use the socli.tui.ScrollableTextBox function in socli

To help you get started, we’ve selected a few socli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gautamkrishnar / socli / socli / tui.py View on Github external
def set_description(self):
        """
        We must use a box adapter to get the text to scroll when this widget is already in
        a Pile from the main question page. Scrolling is necessary for long questions which are longer
        than the length of the terminal.
        """
        self.content = self.description.strip("\n").split("\n")
        self._w = ScrollableTextBox(self.content)
github gautamkrishnar / socli / socli / tui.py View on Github external
def set_answer(self):
        """
        We must use a box adapter to get the text to scroll when this widget is already in
        a Pile from the main question page. Scrolling is necessary for long answers which are longer
        than the length of the terminal.
        """
        self.content = [('less-important', 'Answer: ')] + self.answers[self.index].split("\n")
        self._w = ScrollableTextBox(self.content)