Questions tagged [textual-framework]

Python framework for creating TUIs. Use this tag for questions about programming with Textual.

5 questions
2
votes
1 answer

dynamically determine height of widget in python-textual

I develop a simple app using Textual framework. I have two widgets W1 and W2. W1 has a fixed height of 20 (lines). Now I want W2 to take up the rest of the vertical space. In css for a browser I would use calc(100vh - 20) but textual does not (yet)…
cknoll
  • 2,130
  • 4
  • 18
  • 34
2
votes
2 answers

Textual (python) - how to add click event in simple Text object?

I'm trying to get it so I can add links in text rendered by Textual. My text may have multiple links, for example: Hello [@click=hello]World[/] there, how are you? This is a test of [@click=more] more info[/] being clickable as well. In this simple…
Brad Parks
  • 66,836
  • 64
  • 257
  • 336
1
vote
0 answers

How to call method in correct asyncio context from a different thread in Python (Textual framework)

I have an old python multithreaded console app using urwid as its visualization library. I'd like to switch to Textual which looks amazing. I've never managed a mix of multithreaded and asyncio code, and I'd like to avoid rewriting the old app to…
1
vote
0 answers

Updating Textual widgets in place

I have built the following app that will show a text description. The user then selects the correct category (by pressing one of the SelectButtons) for this description and presses the "next" button (ActionButton). In doing so, the selected cateogry…
KOB
  • 4,084
  • 9
  • 44
  • 88
0
votes
0 answers

Add functionality to Textual Layout - Python

Textual Application-Adding Functionality ? I am trying to create a define function that would show up in one of the placeholders in the TUI. How would I do that ? I am sing the incredible Textual Library by @Will McGugan My Code : from textual.app…