¿Cómo restaurar el color de un ListBox a su valor predeterminado?En el siguiente JSL, después de cambiar el color del marco ListBox, ¿cómo puedo revertirlo al color predeterminado?
Además, si quiero cambiar el color de fondo del ListBox, ¿cómo debo configurarlo? El comando para cambiar el color de fondo modifica el color del marco.
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?");
Automatización y scriptingRe: ¿Cómo restaurar el color de un ListBox a su valor predeterminado?Para restablecerlo, configúrelo en "Ninguno" y no estoy seguro de cambiar el fondo.
Editar:
Y cuando intentes resolver este tipo de cosas, puedes intentar obtener el valor predeterminado antes de cambiarlo. Para ello, puedes usar "Obtener color de fondo".
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);