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!
Copy link to clipboard
Copied
While moving the columns cell lines hold down the command/ctrl key.
Copy link to clipboard
Copied
Hi WIlli, I'm looking for a scripting solution.
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?
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.
Copy link to clipboard
Copied
No, there's nothing built-in, you have to do it yourself.
Copy link to clipboard
Copied
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 ?