3 Replies Latest reply on Nov 21, 2015 6:33 PM by Chuck Uebele

    UI Elements Properties

    Royi A Level 1


      Is there a place for documentation of UI Elements Properties?

      • Scroll Bars
        I use scroll bars like that:

        parametersPanel.parametersGrp1.parameter1ScrollBar                  = parametersPanel.parametersGrp1.add('Scrollbar');
        parametersPanel.parametersGrp1.parameter1ScrollBar.minvalue         = tonalRangeCeneterMinValue;
        parametersPanel.parametersGrp1.parameter1ScrollBar.maxvalue         = tonalRangeCeneterMaxValue;
        parametersPanel.parametersGrp1.parameter1ScrollBar.value            = tonalRangeCeneterDefault;
        parametersPanel.parametersGrp1.parameter1ScrollBar.stepdelta        = tonalRangeCeneterStepDelta;
        parametersPanel.parametersGrp1.parameter1ScrollBar.jumpdelta        = tonalRangeCeneterJumpDelta;
        parametersPanel.parametersGrp1.parameter1ScrollBar.preferredSize    = [200, 20];

        Yet though I set both jumpdelta and stepdelta to 1, it doesn't obey (Clicking on the arrow moves the value by 0.01).
        How can I make a scroll bar work only on Integers?

      • Sliders
        I saw people here using sliders, what's are it properties?
        What's the difference between slider and a Scroll Bar?
      • Drop Down Menus
        How can I set the different values?
        How can I extract which one was selected?


      In general I didn't found anything on Adobe Photoshop Scripting.


      Thank You.

        • 1. Re: UI Elements Properties
          Chuck Uebele Adobe Community Professional & MVP

          Is this for javascript-extendscript? If so, did you look at the tools guide?


          http://download.macromedia.com/pub/developer/aftereffects/scripting/JavaScript-Tools-Guide -CC.pdf

          • 2. Re: UI Elements Properties
            Royi A Level 1


            Well it seems there is a bug when you set stepsize for Scroll Bars to be 1, it ignores them and steps in 0.01 (Photoshop CC 2015).

            I wist there was a slider which jumps over integers (With the Ticks at the bottom).


            Moreover, I didn't understand from there how set the Drop Down List names and how to extract which value was selected.

            • 3. Re: UI Elements Properties
              Chuck Uebele Adobe Community Professional & MVP

              I'm not sure about the scroll bars, as I don't use them. However, for the dropdownlist, you want to define an array with the list of items you want in your list. Getting the value varies, you can get either the text value or the array value. I tend to use the array value, so when you write the code to get the value, you want to define the returned value as a number using parseInt.


              var dropListArray = ['one','two','three'];
              //code here to define you UI first
              dlg.dropList = dlg.add('dropdownlist',undefined,dropListArray)
              //to set the drop list:
              dlg.dropList.selection = 0
              //To get the value of a selection:
              var dListValue = parseInt(dlg.dropList.selection)//gets array value
              var dListValue = dlg.dropList.text//gets the text value.