abracadabraPDF › Forums › PDF – Général › Afficher réponses masquées sur un PDF › Répondre à : Afficher réponses masquées sur un PDF
2 août 2021 à 15:06
#69500
bebarth
Maître des clés
Je viens de faire la même chose pour un autre post !
Pour modifier l’action de tous les boutons :
Code:
for (var i=0; i var f=this.getField(this.getNthFieldName(i));
if (f.type=”button”) f.setAction(“MouseUp”, “if(event.target.fillColor==”G,1”) {event.target.fillColor=color.transparent;event.target.strokeColor=color.transparent;event.target.buttonSetCaption(“”);}else{event.target.fillColor=color.white;event.target.strokeColor=color.gray;event.target.buttonSetCaption(“CLIQUEZ ICI”);}”);
}
if (f.type=”button”) f.setAction(“MouseUp”, “if(event.target.fillColor==”G,1”) {event.target.fillColor=color.transparent;event.target.strokeColor=color.transparent;event.target.buttonSetCaption(“”);}else{event.target.fillColor=color.white;event.target.strokeColor=color.gray;event.target.buttonSetCaption(“CLIQUEZ ICI”);}”);
}
Et si tu ne veux pas de “CLIQUEZ ICI”, tu supprimes (2 fois) l’instruction “event.target.buttonSetCaption”.
@+
:bonjour: