Ugh - Why doesn't this give a multiline label?

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

myranalis

Ugh - Why doesn't this give a multiline label?

Post by myranalis »

Code: Select all   win.lblSummary = win.pnlSummary.add("statictext",undefined, "");
   win.lblSummary.multiline = true;
   win.lblSummary.preferredSize[300,500];
   win.lblSummary.text = "Something\nSomething2\nSomething3"

I've also tried as a text box, and that doesn't multiline either. ??
Mike Hale

Ugh - Why doesn't this give a multiline label?

Post by Mike Hale »

I have only had luck by defining the creation properties as part of the add arguments.
Code: Select all   win.lblSummary = win.pnlSummary.add("statictext",undefined, "",{multiline:true});
And you need to assign the preferredSize
Code: Select allwin.lblSummary.preferredSize = [300,500];
myranalis

Ugh - Why doesn't this give a multiline label?

Post by myranalis »

huh - where did that '=' go?? Thanks for spotting that. I did try specifying multiline at creation - but maybe the bad size specification was hampering my experiments - will give it another go.