Article View: adobe.scripting.indesign
Article #15105Re: Updating text column fixed width
From: Robert_Kyle
Date: Thu, 18 Dec 2003 01:17
Date: Thu, 18 Dec 2003 01:17
11 lines
1352 bytes
1352 bytes
In the UI of v2.0.2 the vaue of the column width updates dynamically as you change the number of text columns. But that must be some kind of calculation that's done only in the UI. If you change text column count in a script and then ask for the fixed width, you don't get the correct results.
In case anyone else needs to do the math, here's what I came up with:
tell application "InDesign"
set theTarget to item 1 of the selection
set {y1, x1, y2, x2} to geometric bounds of theTarget
set nCols to text column count of text frame preferences of theTarget
set gutterWidth to text column gutter of text frame preferences of theTarget
set colWidth to (x2 - x1 - (gutterWidth * (nCols - 1))) / nCols
end tell
Technical Details
Message-ID:
<2ccefcd0.1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccefcd0.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,f5f19f5857c3dfb2 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-17 17:37:42 PST From: Robert_Kyle@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Updating text column fixed width Message-ID: <2ccefcd0.1@webx.la2eafNXanI> Date: Wed, 17 Dec 2003 17:17:59 -0800 References: <2ccefcd0.-1@webx.la2eafNXanI> Lines: 16 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit