Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

427
Visualizações
En Adobe Illustrator, cómo cambiar el color blanco de Edittext a transparente con javascript cuando está activo

ingrese la descripción de la imagen aquí

Quiero cambiar el color blanco a transparente cuando el texto de edición está activo. Por favor, ayúdame.

 w.alignChildren = ["fill","fill"]; w.preferredSize = [150, 250]; w.inputBox = w.add('panel', undefined, "Input Box"); w.inputBox.add('statictext{text: "Height: "}'); var heightInput = w.inputBox.add('edittext {characters: 12, active: true}'); w.inputBox.add('statictext{text: "Width: "}'); var widthInput = w.inputBox.add('edittext {characters: 12, active: false}'); w.inputBox.add('statictext{text: "Spine: "}'); var spineInput = w.inputBox.add('edittext {characters: 12, active: false}'); w.inputBox.add('statictext{text: "Joint: "}'); var jointInput = w.inputBox.add('edittext {characters: 12, active: false}'); var okBtn = w.add("button", undefined, "Draw");
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Prueba esto:

 // set background color for 'Height' to the dark gray [0.2,0.2,0.2] heightInput.graphics.backgroundColor = heightInput.graphics.newBrush(heightInput.graphics.BrushType.SOLID_COLOR,[0.2, 0.2, 0.2]); // text color for 'Height' to white [1,1,1] heightInput.graphics.foregroundColor = heightInput.graphics.newPen(heightInput.graphics.PenType.SOLID_COLOR, [1,1,1], 1);

Pero la interfaz de usuario puede funcionar de manera diferente en algunas versiones de Illustrator. Acabo de probarlo en mi CS6/Win10 y parece funcionar.

Más información está aquí: https://creativepro.com/files/kahrel/indesign/scriptui.html

ingrese la descripción de la imagen aquí

Código completo:

 var w = new Window ("dialog"); var text_color = [1,1,1]; var bg_color = [.2,.2,.2]; w.alignChildren = ["fill","fill"]; w.preferredSize = [150, 250]; w.inputBox = w.add('panel', undefined, "Input Box"); w.inputBox.add('statictext{text: "Height: "}'); var heightInput = w.inputBox.add('edittext {characters: 12, active: true}'); heightInput.graphics.foregroundColor = heightInput.graphics.newPen(heightInput.graphics.PenType.SOLID_COLOR, text_color, 1); heightInput.graphics.backgroundColor = heightInput.graphics.newBrush(heightInput.graphics.BrushType.SOLID_COLOR,bg_color); w.inputBox.add('statictext{text: "Width: "}'); var widthInput = w.inputBox.add('edittext {characters: 12, active: false}'); widthInput.graphics.foregroundColor = widthInput.graphics.newPen(widthInput.graphics.PenType.SOLID_COLOR, text_color, 1); widthInput.graphics.backgroundColor = widthInput.graphics.newBrush(widthInput.graphics.BrushType.SOLID_COLOR,bg_color); w.inputBox.add('statictext{text: "Spine: "}'); var spineInput = w.inputBox.add('edittext {characters: 12, active: false}'); spineInput.graphics.foregroundColor = spineInput.graphics.newPen(spineInput.graphics.PenType.SOLID_COLOR, text_color, 1); spineInput.graphics.backgroundColor = spineInput.graphics.newBrush(spineInput.graphics.BrushType.SOLID_COLOR,bg_color); w.inputBox.add('statictext{text: "Joint: "}'); var jointInput = w.inputBox.add('edittext {characters: 12, active: false}'); jointInput.graphics.foregroundColor = jointInput.graphics.newPen(jointInput.graphics.PenType.SOLID_COLOR, text_color, 1); jointInput.graphics.backgroundColor = jointInput.graphics.newBrush(jointInput.graphics.BrushType.SOLID_COLOR,bg_color); var okBtn = w.add("button", undefined, "Draw"); w.show();

Win10/CS6:

ingrese la descripción de la imagen aquí

Mac OS High Sierra / CC 2014 (18.0.0)

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda