Copy link to clipboard
Copied
Hi,
How to change statictext's font size and button's font size in UI?
thks.
goldbridge
var w = new Window ("dialog");
var s = w.add ("statictext", undefined, " 30 Point Static");
var s2 = w.add ("statictext", undefined, " 100 Point Static");
// the third argument is the font size
s.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 30);
s2.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 100);
w.show ();
See the example above.
See also Peter Karhels Guide to UI. Very recommended.
Copy link to clipboard
Copied
var w = new Window ("dialog");
var s = w.add ("statictext", undefined, " 30 Point Static");
var s2 = w.add ("statictext", undefined, " 100 Point Static");
// the third argument is the font size
s.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 30);
s2.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 100);
w.show ();
See the example above.
See also Peter Karhels Guide to UI. Very recommended.
Copy link to clipboard
Copied
Just saw in the guide there page 61 that you can use.
s2.graphics.font = "Helvetica:125";
Where 125 is the font size.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now