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

Bridge 13 scriptUI: font style/color/size no longer work

Community Expert ,
Oct 23, 2022 Oct 23, 2022

Copy link to clipboard

Copied

Setting these ScriptUIGraphics object properties has no effect in the UI display:

 

graphics.font  

graphics.foregroundColor

graphics.newPen

 

(for edittext object)

graphics.backgroundColor

graphics.newBrush

 

gregreser_0-1666569478911.png

 

#target bridge

var w = new Window ("window");
w.graphics.backgroundColor = w.graphics.newBrush (w.graphics.BrushType.SOLID_COLOR, [0.1, 0.2, 0.4]);

var s = w.add ("statictext", undefined, "Static Text");
s.preferredSize = [200,60];
s.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 30);
s.graphics.foregroundColor = s.graphics.newPen( s.graphics.PenType.SOLID_COLOR, [0.7, 0.5, 0.2], 1);

var e = w.add ("edittext", undefined, "Edit Text");
e.preferredSize = [300,25];
e.graphics.font = ScriptUI.newFont ("Times", "Regular", 16);
e.graphics.foregroundColor = e.graphics.newPen (e.graphics.PenType.SOLID_COLOR, [0.6, 0.2, 0.0], 1);
e.graphics.backgroundColor = e.graphics.newBrush (e.graphics.BrushType.SOLID_COLOR, [1, 1, 1]);

var g = w.add('group', undefined, "Group")
g.preferredSize = [200,60]
g.graphics.foregroundColor = g.graphics.newPen (g.graphics.PenType.SOLID_COLOR, [0.3, 1, 0.2], 1);
g.graphics.backgroundColor = g.graphics.newBrush (g.graphics.BrushType.SOLID_COLOR, [0.2, 0.4, 0.8]);
text = g.add ("statictext", undefined, "Group Static Text");
text.graphics.font = ScriptUI.newFont ("Times", "Italic", 20);

var p =  w.add('panel', undefined, "Panel")
p.preferredSize = [200,60]
p.graphics.backgroundColor = p.graphics.newBrush (p.graphics.BrushType.SOLID_COLOR, [0.6, 0.7, 0.1]);

var b = w.add ("button", undefined, "Button ");
b.preferredSize = [150,40];
b.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 16);

w.show ();

 

TOPICS
Bug , Scripting

Views

161

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
Community Expert ,
Oct 23, 2022 Oct 23, 2022

Copy link to clipboard

Copied

LATEST

I'm getting the same as you. I'm not sure what changes.

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