Skip to main content
rechmbrs
Inspiring
June 26, 2017
Answered

Scriptui change text size in Dialog top bar?

  • June 26, 2017
  • 1 reply
  • 1522 views

In Scriptui, I'd like to increase text size of TITLE in Dialog top bar?

This is what I've tired so far:

var dlg = new Window('dialog', scriptName + '  ' + scriptVersion, undefined, undefined);

dlg.alignment = "center";

dlg.graphics.font = "Arial-Bold: 40";

Searched the few docs available with no luck.

Thanks,

RONC

This topic has been closed for replies.
Correct answer pixxxelschubser

Thanks for the response.

I have the show much later in the dialog building.

As I see this, it will write the text not in the title bar but in the

normal area of the dialog. How do I change background color around the

statictext and also hide the just the title bar? Not hide the border.

RONC


IMO the title always exists.

The third question

var scriptName = "YourScriptName";

var scriptVersion = "0.01";

var dlg = new Window('dialog');

dlg.graphics.backgroundColor = dlg.graphics.newBrush (dlg.graphics.BrushType.SOLID_COLOR, [1, 0, 0], 0);

dlg.alignment = "center";

dlgTxt = dlg.add("statictext",  undefined, scriptName + '  ' + scriptVersion);

dlgTxt.graphics.font = "Verdana:40";

dlgTxt2 = dlg.add("statictext",  undefined, scriptName + '  ' + scriptVersion);

dlgTxt2.graphics.font = "Arial-Bold:40";

dlg.show ();

Have fun

1 reply

JJMack
Community Expert
Community Expert
June 26, 2017

Which version of scriptUI are you referring to CC 2015 ScriptUI version or some prior version. You may not be able to change its size only set  a string of text.

JJMack
rechmbrs
rechmbrsAuthor
Inspiring
June 26, 2017

JJMack,

Thanks again for a quick and helpful response.

I have ESK 4.5.5 and SUI 6.2.2.   What docs I viewed where on web so do not know level.  I had not seen the list you included. What is URL of the doc you viewed?  How does SUI 6.2.2 relate to your doc?

RONC

pixxxelschubser
Community Expert
Community Expert
June 26, 2017

Hi rechmbrs​,

var scriptName = "YourScriptName";

var scriptVersion = "0.01";

var dlg = new Window('dialog', scriptName + '  ' + scriptVersion, undefined, undefined);

dlg.alignment = "center";

dlg.graphics.font = "Arial-Bold:40";   //  -------------------------  !!! does not works in title !!!

dlgTxt = dlg.add("statictext",  undefined, scriptName + '  ' + scriptVersion);

dlgTxt.graphics.font = "Verdana:40";

dlgTxt2 = dlg.add("statictext",  undefined, scriptName + '  ' + scriptVersion);

dlgTxt2.graphics.font = "Arial-Bold:40";

dlg.show ();

Have fun