• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

1.6K

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";

Best

Sunil​

Votes

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​

Votes

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
Community Expert ,
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

Votes

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

Votes

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
Enthusiast ,
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 ??
 

Votes

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