Script UI - EditText

Participant ,
Apr 28, 2019 Apr 28, 2019

Copy link to clipboard

Copied

Hi friend,

I have a script with "EditText" inside, and I want to change

the writing direction (of the default) - from left to right to right-to-left.

I can do this manually (by right-clicking on "edittext"),

but I wonder if it is possible to do this with exstenScript code?

TOPICS
Scripting

Views

983

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Jul 04, 2019 Jul 04, 2019
Hi yon1313​,You can set justify propery for this: like this--var w = new Window ("dialog", "", undefined, undefined);var editText = w.add("edittext");editText.preferredSize.width = 100;editText.justify = "right"w.show()This is the solution for you:editText.justify = "right";BestSunil​

Likes

Translate

Translate
Advocate ,
Jul 04, 2019 Jul 04, 2019

Copy link to clipboard

Copied

Hi yon1313​,

You can set justify propery for this: like this--

var w = new Window ("dialog", "", undefined, undefined);

var editText = w.add("edittext");

editText.preferredSize.width = 100;

editText.justify = "right"

w.show()

This is the solution for you:

editText.justify = "right";

Best

Sunil​

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 05, 2019 Jul 05, 2019

Copy link to clipboard

Copied

Hi Sunil,

hm. justify = "right" does not mean text is running from Right-to-Left with e.g. Hebrew text.

Don't know if that's possible at all.

As you can see from the second screen where "Right to left Reading order" is checked the text is still showing as:

"Text type Right to left" and not: "tfel ot thgiR epyt txeT".

Regards,
Uwe

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 05, 2019 Jul 05, 2019

Copy link to clipboard

Copied

Hi Laubender,

Justifying doesn't give you "tfel ot thgiR epyt txeT";

I will give you "Text type Right to left" only.

Justifying won't give to the scroll bar to the left problem.

That is the case.

I am also searching for the same.

Best

Sunil

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 07, 2021 Dec 07, 2021

Copy link to clipboard

Copied

LATEST

@Sunil Yadav 

How can I make the writing language Arabic automatically .. 
I know that this is the language of the computer and the device ..
But is there a code that enables me to make the writing Arabic when writing inside the edittext ??
 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines