abracadabraPDF › Forums › PDF – Général › Couleur d’un champ en fonction d’un choix dans une liste déroulante › Répondre à : Couleur d’un champ en fonction d’un choix dans une liste déroulante
30 juillet 2018 à 11:03
#64409

Maître des clés
Il suffit d’ajouter une espace dans la liste des items de la liste pour obtenir un item neutre.
:Smiley15:
Code:
if (event.value == « DISPO ») {
this.getField(« texte »).fillColor = color.green;
this.getField(« texte »).readonly = false;
}
else if (event.value == « HS ») {
this.getField(« texte »).fillColor = color.red;
this.getField(« texte »).readonly = true;
}
else {
this.getField(« texte »).fillColor = color.transparent;
this.getField(« texte »).readonly = false;
}
this.getField(« texte »).fillColor = color.green;
this.getField(« texte »).readonly = false;
}
else if (event.value == « HS ») {
this.getField(« texte »).fillColor = color.red;
this.getField(« texte »).readonly = true;
}
else {
this.getField(« texte »).fillColor = color.transparent;
this.getField(« texte »).readonly = false;
}