3 Replies Latest reply on Jan 5, 2011 6:11 PM by pali185

    create textarea

    pali185

      Hello,
      I want to create a window where we have a possibility of introducing a block of text (multiple lines ...). Closest to the problem component is 'EditText', but when new line (press ENTER) to confirm and close the window. I would like to ask whether there is a textarea component because I found it in help ExtendScript Toolkit. Enclose windows crude example, I have in mind with the component 'EditText':


      var dialog = new Window('dialog', 'Alert Box Builder',[100,100,580,345]);
      dialog.farbaVizitky = dialog.add('panel', [45,50,435,230], 'Zadaj Adresu');
      dialog.farbaVizitky.cervena = dialog.farbaVizitky.add('edittext', [15,15,95,35], 'prve');
      dialog.farbaVizitky.modra = dialog.farbaVizitky.add('edittext', [15,50,95,70], 'druhe');
      dialog.farbaVizitky.cervena.value = true;
      dialog.farbaVizitky.buildBtn = dialog.farbaVizitky.add('button', [105,80,185,105],
      'OK', {name:'ok'});
      dialog.show();

       

      Thank you

        • 1. Re: create textarea
          xbytor2 Level 4

          According to my notes it's: Ctrl-Enter(Win)/Ctrl-m(Mac). This may have changed from rev to rev. There may be work-around that involes setting win.defaultElement to undefined when the text widget gets focus and restoring the defaultElement when it loses focus.

          1 person found this helpful
          • 2. Re: create textarea
            Michael L Hale Level 5

            You need to set the multiline property for the edittext control to true.

             

            dialog.farbaVizitky.cervena = dialog.farbaVizitky.add('edittext', [15,15,95,55], 'prve',{multiline:true});

             

            Even then you will need the meta keys Xbytor listed to create the new line in the control. I am not sure that defalutElement set to null will help. Even with the edittext control is set to multiline and no defaultElement set, ctrl-enter(win) is needed to create the new line

            • 3. Re: create textarea
              pali185 Level 1

              Setting multiple properties on the true me solve the problem. DefaultElement set to null does not help. Submit and ENTER lose focus. I will have to settle for creating new line with key CTRL + ENTER :). Thank you for your solutions