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

How to change statictext's font size and button's font size in UI?

Community Beginner ,
Mar 23, 2012 Mar 23, 2012

Hi,

How to change statictext's font size and button's font size in UI?

thks.

goldbridge

TOPICS
Scripting
1.3K
Translate
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

Guru , Mar 23, 2012 Mar 23, 2012

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.

http://www.kahrel.plus.com/indesign/scriptui-1-9.pdf

Translate
Guru ,
Mar 23, 2012 Mar 23, 2012

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.

http://www.kahrel.plus.com/indesign/scriptui-1-9.pdf

Translate
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
Guru ,
Mar 23, 2012 Mar 23, 2012
LATEST

Just saw in the guide there page 61 that you can use.

s2.graphics.font = "Helvetica:125";

Where 125 is the font size.

Translate
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