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

Sync many columns' width #2136

Closed
MultiTeemer opened this issue Oct 17, 2018 · 3 comments
Closed

Sync many columns' width #2136

MultiTeemer opened this issue Oct 17, 2018 · 3 comments
Labels

Comments

@MultiTeemer
Copy link

I want to make several 2-columns blocks with possibility to change their width simultaneously.
I managed to achieve this using the same ID for them, but this mechanism doesn't work when I use PushID()/PopID() calls.
Let's consider example:

example

If I add PushID/PopID calls inside "some header", inner columns stop to change their size by dragging outside columns.

I've also tried to use functions GetColumnWidth, SetColumnWidth, but it results in flickering and visual artifacts:

example2

Is there some way to achieve such a functionality?

@meshula
Copy link

meshula commented Oct 17, 2018

I was recently trying to solve this as well; no luck. (I wanted all the second columns visually aligned with each other, irrespective of tree expansion level)

@ocornut ocornut added the tree tree nodes label May 2, 2019
@ocornut
Copy link
Owner

ocornut commented May 2, 2019

Hello,
I don't have a full answer right now but I've been looking at those issues recently.
Please note that in your specific case you only require a sync because you are using a CollapsingHeader() in the middle of the column set and this is forcing you to end/begin the columns set again.
Without the CollapsingHeader you wouldn't need this.

@ocornut
Copy link
Owner

ocornut commented Dec 8, 2020

Closing as this is supported by Tables api

Tables with the same identifier share all settings (width, visibility, order, etc)
tables_synced

Honoring indentation is configurable on a per-column basis:

image

To replicate what the gif above tries to do you would probably want to indent after opening the table.

@ocornut ocornut closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants