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

Changing text color in ScriptUI won't work with the new UI

Community Beginner ,
Mar 28, 2024 Mar 28, 2024

Copy link to clipboard

Copied

This snippet should be self-explanatory 😉

var win = new Window("palette", "test");
win.txt = win.add('statictext', undefined, "Hello World!");
win.layout.resize();

// This should change the txt color
// It works in non-beta
var g = win.txt.graphics;
var color = [1,0,0,1]; // RED!
var textPen = g.newPen( g.PenType.SOLID_COLOR, color, 1 );
g.foregroundColor = textPen;

win.show();

 It works correctly in the latest release, but not in the Beta with the new UI.
There's no error, it just doesn't change the color.

Bug Unresolved

Views

59

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
no replies

Have something to add?

Join the conversation
Resources