How to restore the color of a ListBox to its default?In the following JSL, after changing the color of the ListBox frame, how can I revert it to the default color?
Also, if I want to change the background color of the ListBox, how should I set it up? The command for changing the background color modifies the color of the frame.
Names Default To Here( 1 );
New Window( "Example",
b = List Box( {"single", "double", "triple"}, nlines( 5 ) )
);
wait(2);
b<< background color("red");
wait(2);
//b<< background color("default color?");
Automation and ScriptingRe: How to restore the color of a ListBox to its default?To reset it set it to "None" and I'm not sure about changing the background.
Edit:
And when you are trying to figure out stuff like this, you can attempt to get the "default" value before changing it. In this you can use << Get Background Color
Names Default To Here(1);
nw = New Window("Example",
lb = List Box({"single", "double", "triple"}, nlines(5))
);
def_color = lb << Get Background Color();
show(def_color);
Wait(1);
lb << background color("red");
Wait(1);
lb << background color("None"); // after you have checked what it is
// Or sometimes you might want to use
lb << background color(def_color);