textual
textual copied to clipboard
[Question] How can I change the text that is inside a Panel after a certain time or action?
class Logs(Widget):
mouse_over = Reactive(False)
def render(self) -> Panel:
return Panel(Align.left("Test", style="white"))
def on_enter(self) -> None:
self.mouse_over = True
def on_leave(self) -> None:
self.mouse_over = False
class MyApp(App):
async def on_mount(self) -> None:
await self.view.dock(Logs(), edge="top", name="right_tab")
Now I want to edit that "Test" later on. How would I do that?