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

Aligning a dynamic table

jenniferbunecke
Registered: Jul 29 2009
Posts: 35

I created a dynamic table using LiveCycle where rows are "hidden" or "visible" depending on if certain check boxes are marked. My problem is that the table always starts on the far left edge. If only one chack box is marked, the table will appear to be very off-center (if all check boxes are marked, it looks correct.)

Is there a way to align the dymanic table to the center, and as more rows are added, the whole table continually realigns itself to the center?

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

this task can not be done with the default features of Designer.
But, you can do this with FormCalc scriptings.

All you need to know is the width/height of your whole table and of the columns or rows you add/remove.

The rest can be done by a algorythm that you put into the click:event of a add/remove button for example:
// Relocate the table horizontally, so it's always in centervar ColumnCount = Col.instanceManager.countvar StartWidth = UnitValue("45mm", "in")var ColumnWidth = UnitValue("10mm", "in")var NewTableWidth = StartWidth + (ColumnWidth * ColumnCount)var SubformWidth = Body.wvar SumbformCenter = UnitValue(SubformWidth, "in") / 2var TableCenter = UnitValue(NewTableWidth, "in") / 2var NewTablePosition = SumbformCenter - TableCenterTable.x = UnitValue(NewTablePosition, "in")

// Relocate the table vertically, so it's always in centervar RowCount = ChartValues.instanceManager.countvar StartHeight = UnitValue("5mm", "in")var RowHeight = UnitValue("5mm", "in")var NewTableSize = StartHeight + (RowHeight * RowCount)var SubformHeight = Body.hvar SumbformCenter = UnitValue(SubformHeight, "in") / 2var TableCenter = UnitValue(NewTableSize, "in") / 2var NewTablePosition = SumbformCenter - TableCenterTable.y = UnitValue(NewTablePosition, "in")

Example:
[url]https://acrobat.com/#d=j*HjTeHN3CaHpI6j824P1g[/url]

Good luck!

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs