Replies: 3 comments 13 replies
-
What happens when you update your Rich component? I want to say that if you change what you want to display then Textual will handle the updating. I.e. no need to explicitly update, just change your data and let Textual handle it. That being said, the examples all seem to be static content at the moment, so 🤷🏻♂️ @willmcgugan could be worth adding current time to one of the placeholders in the examples so people can see something updating? Just a thought. |
Beta Was this translation helpful? Give feedback.
-
You can do this, but you would be a super early adopter. If you are brave you could give something like this a try: class LayoutApp(App):
async def on_load(self, event):
await self.bind("q", "quit")
await self.bind("b", "bell")
async def action_bell(self):
self.console.bell()
async def get_layout(self) -> Layout:
# Build your layout here
async def on_startup(self, event:events.Startup) -> None:
self.layout_widget = Static(self.get_layout())
await self.dock(layout_widget)
await self.set_interval(0.1, callback=get_layout)
async def update_layout(self) -> None:
self.layout_widget.update(self.get_layout())
LayoutApp.run() I haven't tested that, so can't guarantee it will work. You may have to figure out the details from the code. |
Beta Was this translation helpful? Give feedback.
-
I found another problem. I can not run my definition with key bindings in textual. Is there any way to do that? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I am working on a project for Jam, and i want to make a dashboard. I used rich, but i cant bind keys or use mouse in it so i tried textual. But in textual because of limited sources i cant find any way to update widgets when program is running (like Live function in rich). Is this feature even implemented yet?

Could you please help me?
thank you
*edit:
Also can i make new sidebars when program is running?
Beta Was this translation helpful? Give feedback.
All reactions