Skip to main content
Participant
June 3, 2020
Answered

How to control ScriptUI editText ScrollBar

  • June 3, 2020
  • 1 reply
  • 495 views

 

 

w = new Window('dialog', 'multiline');
w.alignChildren = 'left';
var group1 = w.add("group", undefined, { name: "group1" });
group1.orientation = "column";
var editText = group1.add("editText", undefined, undefined, { multiline: true, scrolling: true, readonly: true});
editText.preferredSize.height = 500;
editText.preferredSize.width = 500;
editText.text = "123";
var addTextButton = w.add('button', undefined, 'addText');
addTextButton.onClick = function addTextButton_onClick() {
  editText.text =  editText.text.concat("\riiiii");
}
w.show();

 

I have a long editText, and everytime when I update text, the scrollbar will move to the top, but I want it to stay at the buttom. Is there any way to control scrollbar's value of editText? Thanks

 

 

This topic has been closed for replies.
Correct answer Mylenium

I don't think that there is a way to set a persistent view region for a text in any way...

 

Mylenium

1 reply

Mylenium
MyleniumCorrect answer
Legend
June 3, 2020

I don't think that there is a way to set a persistent view region for a text in any way...

 

Mylenium