Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

CS5 table row heights

Return to Member Forum

  • Author
    Posts
    • #57515

      Can someone please direct me to where the table row height setting of 'at least' and 'exact' is located in the 'style-sheet'.

      If this isn't available 'yet'. Is there a script out there that can change all the tables of a document from one state to the other?

      Regardless of any solution,

      Thanks gang for being there !

    • #57542

      “Style-sheet”? It's called “autoGrow” in the JS Help.

      Use like this:

      app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().autoGrow = false; // or 'true', whatever you need.

      This one-line script will set all table rows to 'exact' height. That height, in turn, can be set with a similar line:

      app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().minimumHeight = “5mm”;

      I should note I'm typing off top/head — these lines are Not Tested.

    • #57544

      Thankyou sir!

      That worked very well.

      I'm very new to JavaScript,I thought that I could string 2 scripts together.

      app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().autoGrow = true;

      I thought that i could define the row height at the same time, but I guess not.

      app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().autoGrow = true.minimumHeight = “1p

      Thanks again for the code

    • #57545

      As a matter of fact you can do it with a single command, which is very useful because it's also one single Undo! (You don't have to feel bad about seeing this command for the first time — it dwells into the “advanced” realm of scripting.)

      app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().properties = {autoGrow:true, minimumHeight:”1p”};

      There!

      (You might want to note that this does not change the actual row height. I tested it on some manually enlarged rows, and it happily sets the minimum height but doesn't change the actual height when it's larger than that.)

    • #57699

      Brilliant! It's exactly what I needed.

      I later did a couple of tests, and in all cases my row heights were reset by the script.

      I'm at a lose as to where I could have gone wrong.

      Can you recommend a learning resource that I can check out. I find it a bit awkward to be 'mooching' java scripts.

      I figure that with enough samples in my face, I might be able to build my own.

      My immediate needs are to apply a cell style ( 0.5 pt stroke to the bottom side) to tables with manually stroked cells of 0.5 points or less. and a heavy stroke cell style to cells with strokes that are of a 0.6 point stroke or more.

      thankyou

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
Forum Ads