actionscript 3 - setComponentStyle doesn't work in AS3 -


i have list component in main timeline of movie and...

var tf:textformat = new textformat(); tf.color = xmldata.config.playlist.@textcolor; stylemanager.setstyle("textformat", tf); 

the code above works fine why doesn't work?

stylemanager.setcomponentstyle(list, "textformat", tf); 

the cellrenderer class adapted.

the cellrenderer class defines methods , properties list-based components use manipulate , display custom cell content in each of rows. customized cell can contain text, existing component such checkbox, or class create. list-based components use class include list, datagrid, tilelist, , combobox components.

customcellrenderer.as

you have first created class named customcellrenderer (file > new > actionsript file).

package com  {     import fl.controls.listclasses.cellrenderer;     import flash.text.textformat;      public class customcellrenderer extends cellrenderer     {         public function customcellrenderer()         {             setstyle("textformat", new textformat("arial", 10, 0xff00ff));         }     } } 

myfla.fla

if want apply textformat instance mylist of class list:

import com.customcellrenderer;  mylist.setstyle("cellrenderer", customcellrenderer); 

if want apply textformat instances of class list:

import com.customcellrenderer; import fl.managers.stylemanager;  stylemanager.setcomponentstyle(list, "cellrenderer", customcellrenderer); 

adobe cellrenderer.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -