je voudrais afficher du texte qui change de couleur sur un fond rouge.
Le texte s'affiche et change de couleur, mais la couleur de fond ne s'affiche pas!!
j'aurai besoin d'une aide svp
merci
voici mon code :
/******************************************************************************
* Textback Class
******************************************************************************/
Textback.prototype = new DynamicComponent();
Textback.parent = DynamicComponent.prototype;
Textback.prototype.constructor = Textback;
/******************************************************************************
* Constructor
******************************************************************************/
function Textback()
{
}
/******************************************************************************
* Initialize object
* svgId -> Id of SVG node
* objectName -> global variable name of the object
******************************************************************************/
Textback.prototype.init = function(svgId, objectName)
{
Textback.parent.init.call(this, svgId, objectName, false);
this.m_SizeFont = GetVisioPropAsInt(this.m_SvgNode, "FontSize");
/******************************************************************************
* Callback for refresh event
******************************************************************************/
Textback.prototype.OnRefresh = function()
{
// Get the value
var value = this.m_arrayValueDefinition[0].getValue();
var coltext = colortext;
var red = Math.round((coltext & 0x000000FF) >> 0);
var green = Math.round((coltext & 0x0000FF00) >> 8);
var blue = Math.round((coltext & 0x00FF0000) >> 16);
var fill = "fill:rgb("+ red +","+ green+","+blue+")";
var size = "font-size:"+this.m_SizeFont;
var fontType = "font-family:Arial Unicode MS"
this.m_txtParentElem.setAttribute("style", fill+";"+size+";"+fontType);