2 Replies Latest reply on Oct 9, 2008 11:15 AM by Seth McGraw

    UI not behaving - Pleeze help.

    Seth McGraw Level 1
      I need to make this UI for our Art Dept. The values are not in their proper positions. I would like the "Job Number" to be just above or next to the value that is typed in (like a form). The value typed in will then paste the values inline as text in specific existing locations on the spread.

      Here's a pic of the bad UI object
      UIpic

      Here's the code
      UIscript

      We are beginners. Please use baby talk.

      Thanks for any help,
      Seth
        • 1. Re: UI not behaving - Pleeze help.
          Level 1
          Hi Seth:

          Something like this:

          //DialogForSethMcGraw.jsx
          
          myDisplayDialog();
          function myDisplayDialog(){
          var myLabelWidth = 80;
          var myDialog = app.dialogs.add({name:"Seth's Dialog"});
          with(myDialog.dialogColumns.add()){
            with(borderPanels.add()){
             staticTexts.add({staticLabel:"Cover Size:"});
             var myRadioButtonGroup = radiobuttonGroups.add();
             with(myRadioButtonGroup){
              radiobuttonControls.add({staticLabel:"700 Cover", checkedState:true});
              radiobuttonControls.add({staticLabel:"800 Cover"});
              radiobuttonControls.add({staticLabel:"900 Cover"});
             }
            }
            with(dialogRows.add()){
             with(dialogColumns.add()){
              staticTexts.add({staticLabel:"Job Number:", minWidth:myLabelWidth});
             }
             with(dialogColumns.add()){
              var myJobNumberField = integerEditboxes.add();
             }
            }
            with(dialogRows.add()){
             with(dialogColumns.add()){
              staticTexts.add({staticLabel:"School Name:", minWidth:myLabelWidth});
             }
             with(dialogColumns.add()){
              var mySchoolNameField = textEditboxes.add();
             }
            }
            with(dialogRows.add()){
             with(dialogColumns.add()){
              staticTexts.add({staticLabel:"Litho Colors:", minWidth:myLabelWidth});
             }
             with(dialogColumns.add()){
              var myLithoColorsField = textEditboxes.add();
             }
            }
            with(dialogRows.add()){
             with(dialogColumns.add()){
              staticTexts.add({staticLabel:"Base Material:", minWidth:myLabelWidth});
             }
             with(dialogColumns.add()){
              var myBaseMaterialField = textEditboxes.add();
             }
            }
          }
          var myResult = myDialog.show();
          if(myResult == true){
            var myJobNumber = myJobNumberField.editValue;
            var mySchoolName = mySchoolNameField.editContents;
            var myLithoColors = myLithoColorsField.editContents;
            var myBaseMaterial = myBaseMaterialField.editContents;
            myDialog.destroy();
            //Now send the parameters to another function.
          }
          else{
            myDialog.destroy();
          }
          }

          It's not really clear to me that "Litho Colors" and "Base Material" should be a text field. Wouldn't this be more likely something you could do with a dropdown menu?

          Thanks,

          Ole
          • 2. Re: UI not behaving - Pleeze help.
            Seth McGraw Level 1
            These are simply choices that are to be plugged into template slug data fields. The info will be used to travel with the plate for press to use as a reference. The actual assignments to the art will be done manually in the creation of the content.

            Thanks for the code, I'll have my colleague check it out right away.

            Seth