質問
Add Vertical Scrollbar to the right of the Custom InDesign Palette
Hi Everyone,
I need your support in adding a vertical scrollbar to my custom palette for InDesign. The current palette is growing as I add a new button to it. so I want two vertical scroll bars, one for the 'Custom Checks' and the other for the 'Custom Fixes'. Here's my code:
If easily doable, can we also reduce the margins between the buttons.
Thanks, in advance,
M
#targetengine 'customChecksAndFixes'
// Create the panel window
var myWindow = new Window('palette', "Checks & Fixes - InDesign, v5.0", undefined, { resizeable: true });
// Add here a message "Please Save Your File Before Running a Script!"
var messageText = myWindow.add('statictext', undefined, "Save Your File Before Clicking a Button...");
messageText.alignment = 'center';
// Add buttons to the panel
myWindow.alignChildren = 'column';
myWindow.alignChildren = 'left';
// ************************************************ CUSTOM CHECKS – B U T T O N S
var checkFonts = myWindow.add('button', undefined, 'CHECK - Fonts Status)');
var checkTextSize = myWindow.add('button', undefined, 'CHECK - Text Less than 6pt)');
var checkBaselineShift = myWindow.add('button', undefined, 'CHECK - Text with Baseline Shift)');
var checkRGB = myWindow.add('button', undefined, 'CHECK - RGB Image(s)');
var checkResolution = myWindow.add('button', undefined, 'CHECK - Effective Resolution Below 300');
var checkScaling = myWindow.add('button', undefined, 'CHECK - Image Scaling above 110%');
var checkProportional = myWindow.add('button', undefined, 'CHECK - Non-Proportionally Scaled Image(s)');
var checkEmbedded = myWindow.add('button', undefined, 'CHECK - Pasted & Embedded Image(s)');
myWindow.add('panel', undefined); // Creates a visual separator
// ************************************************ FIXES – B U T T O N S
var removeSpaceBeforePunctuation = myWindow.add('button', undefined, 'FIX - Remove Double & Space(s) Before Punctuation');
var leadingFix = myWindow.add('button', undefined, 'FIX - Leading at the End of a Paragraph');
var fixSwatches = myWindow.add('button', undefined, 'FIX - Convert All Swatches to CMYK');
var reg2BlackFix = myWindow.add('button', undefined, 'FIX - Registration Colour to Black');
var strokeBelow025Fix = myWindow.add('button', undefined, 'FIX - Stroke Below 0.25pt');
var pasteBoardCleanup = myWindow.add('button', undefined, 'FIX - Delete Pasteboard Items');
// ************************************************ F U N C T I O N S
// Show the panel
myWindow.show();
