Skip to content
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

How to add sub-container with id #358

Open
pavel-blagodov opened this issue Dec 28, 2023 · 1 comment
Open

How to add sub-container with id #358

pavel-blagodov opened this issue Dec 28, 2023 · 1 comment
Labels
question Further information is requested

Comments

@pavel-blagodov
Copy link

Hey,

Could you please clarify how to add sub-container with id, so that it can be updated without updating siblings containers. I'm using grid layout

Thank you

@mum4k mum4k added the question Further information is requested label Jan 4, 2024
@mum4k
Copy link
Owner

mum4k commented Jan 4, 2024

Thank you for reaching out @pavel-blagodov. To update a sub-container, you would first give that sub-container a known ID using the contained.ID("some_id") option. You can then update any options on that container including sub-splits by calling the container.Update() method as documented in Dynamic Layout and referring back to the same ID.

Please refer to #359 which demonstrates this on the termdashdemo. When running the demo, you can press Ctrl-U to update a sub-container (changes widget from green sparkline to a red sparkline). Any other updates are possible as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants