How to add the scroll bar in a palette containing the list of images (JSX)?
Hi sahil,
Please try the below JS code is shown in the scroll bar its work in the palette,
#targetengine "session";
var myDoc = app.activeDocument;
var myLinks = myDoc.links.everyItem().name.join("\n");
var w = new Window ("palette", "Arts Name list");
var myText = w.add ("edittext", [0, 0, 200, 150], "", {multiline: true, scrolling: true});
myText.text = myLinks;
w.show ();
thx
csm_phil
csm_phil, that is (again) for a plain text field.
Read http://forums.adobe.com/thread/573855. Don't be alarmed by Marc's 1,000+ sample code somewhere near the start, below it is a further discussion on scrollable panels by Bob Stucky.
thnx for the wonderful guide.
One more query..
I have the following heirarchy: Palette -> Panel -> n sub-panels (each containing an icon_group & a statictext_group)
now, i had given the dimensions & location to all these object by myself. When i run the script, for the first time the placements of objects is slightly different; but after i refreshes the palette, they come to the position that i had defined .
The problem is that why on the first call it shows differently..?
Here is a more digestible script than those in the link Jongware gave: http://indesign-faq.de/de/ScriptUI_scrollbar. It does exactly what you want. The short explanation is in German, but the code is JavaScript, so you should be able to work out how it works. In the ScriptUI for Dummies is an example of a scrollable panel with edit boxes, which is just a variant on what you want.
Peter
North America
Europe, Middle East and Africa
Asia Pacific