Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Moving widgets #3746

Closed
cpiber opened this issue Nov 25, 2023 · 0 comments
Closed

Question: Moving widgets #3746

cpiber opened this issue Nov 25, 2023 · 0 comments

Comments

@cpiber
Copy link

cpiber commented Nov 25, 2023

Is there an API to move widgets beyond Widget.move_child? Or a way to "share" it (show in several places)?

I currently have this situation: There's an application-wide log that I want to display using RichLog. I can easily show the log on one screen. But I want to give the user to change to a sub-screen with a different layout.

I tried having it as a global and yielding it from multiple places, but that breaks layout and styling. If I instead remove it from it's old place in on_mount and mount it in its new place, styling and layout works as expected, but the widget is broken (specifically, it does not properly update anymore, and scrollbars do not appear).

I'm probably overlooking some ergonomic way to solve this instead of moving widgets in the DOM, do you have any suggestions?

@Textualize Textualize deleted a comment from github-actions bot Nov 26, 2023
@Textualize Textualize locked and limited conversation to collaborators Nov 26, 2023
@davep davep converted this issue into discussion #3748 Nov 26, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant