Skip to main content
Inspiring
October 28, 2018
Answered

Aligning Statictext Question.

  • October 28, 2018
  • 2 replies
  • 621 views

I have a group where I want the controls aligned to the right.

In the same group, I have some StaticText

Question:

Is it possible to override the right aligment for the group and have the staticText aligned to the left ?

var g1 = w.add ("group", undefined);

                {

                    g1.alignment = "right";

                    g1.add("statictext", undefined, "some text here");

This topic has been closed for replies.
Correct answer r-bin

var d = new Window("dialog");

d.preferredSize.width = 500;

var p = d.add("panel"); //var p = d.add("group");

p.orientation = "stack";

p.preferredSize.width = 400;

p.alignment = "right";

p.alignChildren = "right";

p.add("button", undefined, "1111");

var t = p.add("statictext", undefined, "2222");

t.alignment = "left";

d.show();

Helped?

2 replies

r-binCorrect answer
Legend
October 28, 2018

var d = new Window("dialog");

d.preferredSize.width = 500;

var p = d.add("panel"); //var p = d.add("group");

p.orientation = "stack";

p.preferredSize.width = 400;

p.alignment = "right";

p.alignChildren = "right";

p.add("button", undefined, "1111");

var t = p.add("statictext", undefined, "2222");

t.alignment = "left";

d.show();

Helped?

IanBarberAuthor
Inspiring
October 29, 2018

Thank You

Geppetto Luis
Legend
October 28, 2018

This is not good for your purpose.

https://forums.adobe.com/thread/2550826