Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
7

Adjust table column width without changing the overall table width

Explorer ,
Oct 05, 2023 Oct 05, 2023

Copy link to clipboard

Copied

Hi all, 

I'm looking for a UXP solution to update a column width while keeping the same table width (i.e. all other columns adjust proportionatly to keep the table width the same). This would be the equivalent to shift+drag on a column edge within the InDesign GUI. Any help would be appreciated!

TOPICS
How to , Scripting , UXP Scripting

Views

856
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 05, 2023 Oct 05, 2023

Copy link to clipboard

Copied

While  moving the columns cell lines hold down the command/ctrl key. 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 06, 2023 Oct 06, 2023

Copy link to clipboard

Copied

Hi WIlli, I'm looking for a scripting solution.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 06, 2023 Oct 06, 2023

Copy link to clipboard

Copied

You're mixing two things: Shift+drag a column edge resizes just the two columns to the left and the right of the selected edge. Shift+drag the table's right border resizes all columns proportionally.

 

To keep a table's width constant after resizing a column, divide the change value by the column count - 1, then resize all columns except the changed column.

 

I'm looking for a UXP solution

 

Does that mean you need more help to write a script that takes a value, resizes the selected column, and updates all other columns, or are you looking for someone to write the script for you?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 09, 2023 Oct 09, 2023

Copy link to clipboard

Copied

Hi Peter, we have a solution but it requires a calculation to determine the width change of the column and then evenly distributing it across the other columns. I was just hoping there was an in-built option like a column width lock that would allow us to do it in a more elegant way, but it sounds like that's not the case. 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 09, 2023 Oct 09, 2023

Copy link to clipboard

Copied

No, there's nothing built-in, you have to do it yourself.

 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 09, 2023 Oct 09, 2023

Copy link to clipboard

Copied

LATEST

When you say, "to update a column width," do you mean that you would like to adjust the column width to fit the contents of that column?

If so, have you seen my (not free): Table Tools for InDesign: AutoFit Columns - Id-Extras.com ?

TW_0-1696893250249.png

 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines