These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Resize Table Column Width

Chandran
Registered: Mar 12 2008
Posts: 58

Hi,

Is possible that a table column width can be resized (decrease and Increase) using Java Script.

Scenario : There is an table with 4 columns, first column will have a drop down based on the selection we have to hide the column 2 and increase the width on the column 4.

(If it is an adjacent column then we can merge, but here hide column 2 and increase column 4 width)

Thanks.
Regards,
Chandran S

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes and No. Table are really groups of Subforms. And yes, subforms and the fields they contain can expand horizontally. But, if you're using LiveCycle Designer 8.2 and specifically inserted a "Table" then you've chosen narrow and specialized set of predefined behavior. This behavior, as far as I can tell, does not include expanding horizontally.

If you want custom behavior then I'd suggest building your table with regular subforms that you can control from a script. This will give you the most flexibility.

And there is another advantage to using regular old subforms. The LiveCycle forms model has gone through dramatic changes with each new version of Acrobat. The current specialized table implementation is new in Acrobat 9. I would be a little weary of it and how things might change in the next version. Stick with stuff that's been around for at least a couple of generations. That way you have some backward campatibility and features that are unlikely to be pulled out from under you.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script