flex - styleManager: problem using setStyleDeclaration -
hey folks..!!
m using stylemanager.setstyledeclaration set cssstyledeclaration object more 1 instance of same component, being used in different canvases.
want set different properties of component in various canvases, wont happen setstyledeclaration takes name of component , set styles globally, suppose.
following first cssstyledeclaration:
this.datatickeroddstyle = new cssstyledeclaration(); this.datatickeroddstyle.setstyle("fillcolors", stringutilex.extractcolorpair(o.dataticker.item[0].background_fill_colors)); this.datatickeroddstyle.setstyle("fillalphas", stringutilex.extractnumberpair(o.dataticker.item[0].background_fill_alphas)); this.datatickeroddstyle.setstyle("gradientratio", stringutilex.extractnumberpair(o.dataticker.item[0].background_gradient_ratios)); this.datatickeroddstyle.setstyle("cornerradius", int(o.dataticker.item[0].background_corner_radius)); this.datatickeroddstyle.setstyle("bordercolor", stringutilex.converttocolor(o.dataticker.item[0].background_border_color)); this.datatickeroddstyle.setstyle("borderthickness", number(o.dataticker.item[0].background_border_thickness));<br>
this how ve used it:
this.stylemanager.setstyledeclaration("com.gradientcanvas",widgetstylesheet.instance.datatickeroddstyle, true);
and cssstyledeclaration is:
this.m_zonebackgroundstyle = new cssstyledeclaration(); this.m_zonebackgroundstyle.setstyle("fillalphas", stringutilex.extractnumberpair(o["background_fill_alphas"])); this.m_zonebackgroundstyle.setstyle("fillcolors", stringutilex.extractcolorpair(o["background_fill_colors"])); this.m_zonebackgroundstyle.setstyle("gradientratio", stringutilex.extractnumberpair(o["background_gradient_ratios"])); this.m_zonebackgroundstyle.setstyle("bordercolor", stringutilex.converttocolor(o["background_border_color"])); this.m_zonebackgroundstyle.setstyle("borderthickness", number(o["background_border_thickness"])); this.m_zonebackgroundstyle.setstyle("cornerradius", number(o["background_corner_radius"]));
and use following:
this.fill.stylemanager.setstyledeclaration("com.gradientcanvas", appstylesheet.instance.m_zonebackgroundstyle, true);<br>
notice m using same selector/component..please me out on this..thanx in advance
i resolved problem. using type selector
before, instead of class selector
.
Comments
Post a Comment