Article View: adobe.scripting.indesign
Article #15068JS: Activating Arrows on Measurement Comobox
From: Dave_Saunders
Date: Tue, 16 Dec 2003 03:43
Date: Tue, 16 Dec 2003 03:43
16 lines
1948 bytes
1948 bytes
A couple of questions about measurement comboboxes (you've got to love an object that has bobo in its name):
1. What does it take to activate the arrows that are part of the combobox? I used this call and everything works except that the arrows sit there greyed out.
with (dialogRows.add()) {
staticTexts.add({staticLabel:"Hyphenation Zone:",minWidth:160});
myHyphZone = measurementComboboxes.add({editValue:Number(toPoints(mySettings.hyphenationZone,
myDoc.viewPreferences.horizontalMeasurementUnits,2)),editUnits:myDoc.viewPreferences.horizontalMeasurementUnits,
minWidth:80,minimumValue:0,maximumValue:1000,smallNudge:1,largeNudge:1})
}
By the way, toPoints is a function I wrote to convert the value of the current zone into points. I thought I was going to have to write a fromPoints as well, but then I realized instead of picking up the editUnits afterwards, it was better to pick up the editContents which is a string that includes the units, so that way when I use it to set the new value, the call looks after the conversion for me.
2. What are the meanings of the 1 values for small and large nudge. They seem to change according to the measurement unit in use. I was afraid I was going to have to calculate them based on the measurement units, but they seem to take on different meanings as the units vary.
Dave
Technical Details
Message-ID:
<2ccef1dc.-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!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,d37b6cb3f6a5e533,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-15 20:07:50 PST From: Dave_Saunders@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: JS: Activating Arrows on Measurement Comobox Message-ID: <2ccef1dc.-1@webx.la2eafNXanI> Date: Mon, 15 Dec 2003 19:43:19 -0800 Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit