Skip to main content
Participant
July 4, 2014
Answered

Table : resize rows proportionally

  • July 4, 2014
  • 1 reply
  • 477 views

Hello,

I am new in javascript indesign. I want to resize rows proportionally in my table, but it seems that when I divided all my rows by 5 for example, all my rows will have the same size even if at the beginning i had some rows bigger than the other rows. I don't if i am clear.

for (var k = 0; k < textframe.tables.rows.length; k++)

{

          textframe.tables.rows.height/=5;

  }

thank you for your help.

This topic has been closed for replies.
Correct answer Jump_Over

Hi,

Check autoGrow property for cells of this table (should be = false)

If not insert a line:

    textframes.cells.everyItem().autoGrow = false;

before those one with height modification.

Jarek

1 reply

Jump_Over
Jump_OverCorrect answer
Legend
July 4, 2014

Hi,

Check autoGrow property for cells of this table (should be = false)

If not insert a line:

    textframes.cells.everyItem().autoGrow = false;

before those one with height modification.

Jarek

aiyalyAuthor
Participant
July 7, 2014

Thank you Jarek!

My solution actually worked, it wasn't that clear when i did the test.

But thank you for your advice. It will make my script more accurate