Tables: ability to get column width as well as bind a resize handler to the column #2591
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

name: Pull Request
about: Create a pull request to help us improve
title: Tables: ability to get column width as well as bind a resize handler to the column
assignees: ''
Description:
This PR adds the
rectSizeproperty to mvTableColumn, with rect width reflecting the actual column width (without cell padding, which horizontally doesn't belong to columns anyway), and rect height set to zero due to difficulties in obtaining table height.It also adds event handling and an
item_resizehandler to table columns. As a side effect this also fixes #2587.Concerning Areas:
ImGuiTableColumn is internal API in Dear ImGui and might change in future. We do use internal APIs here and there, looks like for column width it's worthwhile because some applications really need to get width and resize events without clumsy workarounds. Worst case if API changes, we'll find a new way to obtain the width.