Fit the table after getting width

Participant ,
Jun 12, 2022 Jun 12, 2022

Copy link to clipboard

Copied

Hi,

I used to fit the table after getting the column count. But, when I update the table the table is not getting fit to the frame. Kindly guide me on this.. ?

 

for (n=0; n < myColumnCount; n += 1) {
if (nuColumnWidthCalc[n].value == true) {
tables.columns[n].width = autoWidth;
} else {
tables.columns[n].width = Number(nuColumnWidthFields[n].text.replace(/,/g, "."));
FitPageItem (myStory);
myStory.fit(FitOptions.FRAME_TO_CONTENT);
}

}

-Monisha
TOPICS
How to , Scripting

Views

37

Likes

Translate

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
Adobe Community Professional ,
Jun 13, 2022 Jun 13, 2022

Copy link to clipboard

Copied

LATEST

Hi @MonishaRajendran, please give us better information. We can't judge your code because it is only a little piece with missing variables, eg. "autoWidth" and "myStory" and "FitPageItem" function. We can't possibly know what is going wrong without the full picture. It looks like you are getting numbers from a dialog edit field, but we don't know what those numbers are. It's best if you give us code we can run and test ourselves. Do not be discouraged though—you will get there in the end!

- Mark

Likes

Translate

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