2010-04-11 24 views
0

Je veux faire un texte en surbrillance dans flex textArea mais son htmlText ne supporte pas <font bgcolor='#FFFF00'> part of my text </font> alors je cherche une police qui est à l'opposé de Courier new, quand je l'embarque en flash, et j'écris avec cette couleur que je reçois mettre en évidence l'effet de cette partie de mon texte, comme je tape <font family="negativeOfCourier" color='#FFFF00'> part of my text </font>Y at-il un négatif pour la nouvelle police Courier?

+0

En face que je voulais dire, que l'arrière-plan doit être le texte fin le texte devrait être l'arrière-plan – Biroka

Répondre

1

<font style="font-family:courier;color:white;background-color:black;">white text goes here</font>

note: J'ai essayé de le publier au format, mais ne semble pas SO accepter ces balises.

Editer: Vous pouvez trouver ces choses par vous-même en allant au http://www.w3schools.com.

1

Vous devez utiliser une feuille de style pour cela. Exemple:

var theCSS:String = ".normaltext{color:#FFFF00;font-family:Courier}.highlightedtext{color:#FFFF00;font-family:Arial}"; 
var theStyle:StyleSheet = new StyleSheet(); 
theStyle.parseCSS(theCSS); 
theTextArea.styleSheet = theStyle; 
theTextArea.htmlText = '<span class="normaltext">Normal text here, and</span><span class="highlightedtext"> the highlighted text here</span>';