Adobe 65009333 Scripting Guide - Page 58
For the complete script, see ComplexUI., Creating a more complex user interface
UPC - 883919155852
View all Adobe 65009333 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 58 highlights
User Interfaces Creating a more complex user interface 58 For the complete script, see ComplexUI. var myDialog = app.dialogs.add({name:"ComplexUI", canCancel:true}); with(myDialog){ var mySwatchNames = app.swatches.everyItem().name; //Add a dialog column. with(dialogColumns.add()){ //Create a border panel. with(borderPanels.add()){ with(dialogColumns.add()){ with(dialogRows.add()){ //The following line shows how to set a property //as you create an object. staticTexts.add({staticLabel:"Message:"}); //The following line shows how to set multiple //properties as you create an object. var myTextEditField = textEditboxes.add( {editContents:"Hello World!", minWidth:180}); } } } //Create another border panel. with(borderPanels.add()){ with(dialogColumns.add()){ with(dialogRows.add()){ staticTexts.add({staticLabel:"Point Size:"}); //Create a number entry field. Note that this field uses //editValue rather than editText (as a textEditBox would). var myPointSizeField = measurementEditboxes.add({editValue:72, editUnits:MeasurementUnits.points}); } } } //Create another border panel. with(borderPanels.add()){ with(dialogColumns.add()){ with(dialogRows.add()){ staticTexts.add({staticLabel:"Paragraph Alignment:"}); var myRadioButtonGroup = radiobuttonGroups.add(); with(myRadioButtonGroup){ radiobuttonControls.add({staticLabel:"Left", checkedState:true}); radiobuttonControls.add({staticLabel:"Center"}); radiobuttonControls.add({staticLabel:"Right"}); } } } } //Create another border panel. with(borderPanels.add()){ with(dialogColumns.add()){ with(dialogRows.add()){ staticTexts.add({staticLabel:"Text Color:"}); } var mySwatchDropdown = dropdowns.add({stringList:mySwatchNames, selectedIndex:4}); } } } }