Skip to main content
rechmbrs
Inspiring
March 3, 2020
Answered

How does one make a Scriptui dialog or palette resizeable?

  • March 3, 2020
  • 2 replies
  • 12103 views

I would like to make a Scriptui window user resizeable.  I've tried by adding ,{resizeable: true} into the new window line as well as trying dialog.resizeable = true;

 

See my attempts:

// DIALOG
// ======
var dialog = new Window("dialog"); // , {resizeable:true}
dialog.text = "TABS test";
dialog.orientation = "column";
dialog.alignChildren = ["center", "top"];
dialog.spacing = 0;
dialog.margins = 2;
dialog.resizeable = true;

// TPANEL1
// =======
var tpanel1 = dialog.add("tabbedpanel", undefined, undefined, { name: "tpanel1" });
tpanel1.alignChildren = "fill";
tpanel1.preferredSize.width = 240;
tpanel1.spacing = 10;
tpanel1.margins = 0;

// TAB1
// ====
var tab1 = tpanel1.add("tab", undefined, undefined, { name: "tab1" });
tab1.text = "Tab1";
tab1.orientation = "row";
tab1.alignChildren = ["left", "top"];
tab1.spacing = 0;
tab1.margins = 0;

var button1 = tab1.add("button", undefined, undefined, { name: "button1" });
button1.text = "Button1";

var button2 = tab1.add("button", undefined, undefined, { name: "button2" });
button2.text = "Button2";

// TAB2
// ====
var tab2 = tpanel1.add("tab", undefined, undefined, { name: "tab2" });
tab2.text = "Tab2";
tab2.orientation = "column";
tab2.alignChildren = ["left", "top"];
tab2.spacing = 0;
tab2.margins = 0;

var button3 = tab2.add("button", undefined, undefined, { name: "button3" });
button3.text = "Button3";

var button4 = tab2.add("button", undefined, undefined, { name: "button4" });
button4.text = "Button4";

// TPANEL1
// =======
tpanel1.selection = tab1;

dialog.show();

 

I don't see the little dotted triangle at the lower right corner as one does in windows 10.

 

RONC 

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

Guys,

 

I spend a great deal of my time reading the documents as well as Googling what I'm looking for.  I wouldn't waste your time if I had found an answer.  My question in this thread does not have an answer available in the docs.  I'm aware that ExtendScript is dead but it is the only way at present to fit the needs I have.  It was poorly documented in the first place and the snippets are full of problems.  Another problem is that so much of the code that might have an answer is covered with extra undocumented things that really don't pertain to the topic.  This is why I have placed two examples in the this place.

 

I appreciate your time and especially your responses but you guys go off topic before a solution is made so often.

 

RONC


// DIALOG
// ======
var dialog = new Window("dialog", "", undefined, {resizeable: true} );
dialog.text = "TABS test";
dialog.orientation = "column";
//dialog.alignChildren = ["fill", "top"];
dialog.alignChildren = ["fill", "fill"];
dialog.spacing = 0;
dialog.margins = 2;

// TPANEL1
// =======
var tpanel1 = dialog.add("tabbedpanel", undefined, undefined, { name: "tpanel1" });
tpanel1.alignChildren = "fill";
tpanel1.preferredSize.width = 240;
tpanel1.spacing = 10;
tpanel1.margins = 0;

// TAB1
// ====
var tab1 = tpanel1.add("tab", undefined, undefined, { name: "tab1" });
tab1.text = "Tab1";
tab1.orientation = "row";
tab1.alignChildren = ["left", "top"];
tab1.spacing = 0;
tab1.margins = 0;

var button1 = tab1.add("button", undefined, undefined, { name: "button1" });
button1.text = "Button1";

var button2 = tab1.add("button", undefined, undefined, { name: "button2" });
button2.text = "Button2";

// TAB2
// ====
var tab2 = tpanel1.add("tab", undefined, undefined, { name: "tab2" });
tab2.text = "Tab2";
tab2.orientation = "column";
tab2.alignChildren = ["left", "top"];
tab2.spacing = 0;
tab2.margins = 0;

var button3 = tab2.add("button", undefined, undefined, { name: "button3" });
button3.text = "Button3";

var button4 = tab2.add("button", undefined, undefined, { name: "button4" });
button4.text = "Button4";

// TPANEL1
// =======
tpanel1.selection = tab1;

dialog.onResizing = function() { this.layout.resize(); }

dialog.show();

2 replies

Legend
March 3, 2020

var d = new Window("dialog", "", undefined, {resizeable: true} );

var d = new Window("palette", "", undefined, {resizeable: true} );

var d = new Window("window", "", undefined, {resizeable: true} );

 

Chuck Uebele
Community Expert
Community Expert
March 3, 2020

Ahh! I didn't include the undefined, when I tried it.

Chuck Uebele
Community Expert
Community Expert
March 3, 2020

You might have to use the Resource Specification method of creating your UI. See the Javascript Tool Guide for how to do this. I've never had much luck with it.