2 Replies Latest reply on Nov 7, 2012 7:34 AM by Klustre.

    [JS][CS6] Accessing an EditText's scrollbar properties

    Klustre. Level 1

      Is there a way to access the scrollbar properties of an edittext? I'm trying to set the value of the scrollbar. And eventually having the edittexts scroll simultaneously. Below code doesn't seem to work, but it doesn't throw an error either. The only alternative I can think of is a panel scrollbar, but that wouldn't work for edittexts would it?

      var w = new Window("palette");

      w.group = w.add ("group {alignment: 'center'}");

      var e1 = w.group.add("edittext", [0,0,150,100], undefined, {multiline: true, wantReturn:true});

      var e2 = w.group.add("edittext", [25,0,175,100], undefined, {multiline: true, wantReturn:true});

      var s = w.group.add("scrollbar", [0,0,20,100]);

       

      e1.text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit essecillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat nonproident, sunt in culpa qui officia deserunt mollit anim id est laborum.";

      e2.text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit essecillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat nonproident, sunt in culpa qui officia deserunt mollit anim id est laborum.";

       

      e2.stepdelta = 50;

      e2.value = 50;

       

      s.stepdelta = 50;

      s.value = 50;

       

      w.show();