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

Indesign Script UI static text multiline not working

Contributor ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

Hi all,

I have modified the code of UI to show the long path without hiding in the UI. I have tried  with multiline but the path was not shown into the multiline and its hide to select the long path. Please find the below code and screenhot of the UI. Please let me know what is the issue in the code to sort it out.



Screenshot 2021-07-13 at 4.41.24 PM.png

    var panelOutputLocation = maingroup.add ("panel", [ 0, 0, 100, 80 ], "Output Location");          
    var groupOutputLocation = panelOutputLocation.add ("group {alignChildren:'left', alignment: 'left'}");

    groupOutputLocation.spacing=20;
    groupOutputLocation.margins=[-10, 8, 0, 0];
    groupOutputLocation.upBtn = groupOutputLocation.add ("iconbutton", undefined, myIcon,{style: "toolbutton", toggle: true});  
       
    var fldrSelectedLabel = groupOutputLocation.add("statictext", undefined, "", {multiline: true})

    //Include the default location here
    fldrSelectedLabel.characters = 42;
    fldrSelectedLabel.text = "Default Location";
    fldrSelectedLabel.alignment = 'left';

 

 

groupOutputLocation.upBtn.onClick = function (){
        OutputFolder = Folder.selectDialog("Please Select Output Folder")
        if (OutputFolder!=null){
            var OutputFolderuri = OutputFolder;
            var dcodeOutputFolder = decodeURI(OutputFolderuri);
            fldrSelectedLabel.text = dcodeOutputFolder; 
            }
        else if (OutputFolder==null){
                    alert ("Please select a valid folder");
            }
        };     

 

 

TOPICS
Scripting

Views

262

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

Advisor , Jul 13, 2021 Jul 13, 2021

Hello Rocky@ 

 

It would probably be more helpful if you posted the entire UI code for troubleshooting the issue.....

 

you can give this a try.....

//Change This line
fldrSelectedLabel.alignment = 'left';
//Try this
fldrSelectedLabel.alignment = 'fill';

 

Regards,

Mike

Votes

Translate

Translate
Advisor ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

Hello Rocky@ 

 

It would probably be more helpful if you posted the entire UI code for troubleshooting the issue.....

 

you can give this a try.....

//Change This line
fldrSelectedLabel.alignment = 'left';
//Try this
fldrSelectedLabel.alignment = 'fill';

 

Regards,

Mike

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
Contributor ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

LATEST

Thanks Mike ! Its working fine...

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