Question for guys Flex. How can I use multiple renderings of elements in mx: Tree depending on the depth / level of the element in the tree? For instance. For elements of the first level I want to use a label with a button and for the drop-down lists of elements of the second level.
How is this possible?
Here is the solution: In the extended Tree, simply override the getItemRendererFactory (data: Object): IFactory function and create the necessary logic to select the correct itemRenderer.
Hope this helps someone else as well.
. .
, : http://cookbooks.adobe.com/post_How_do_I_create_a_Tree_itemRenderer_-62.html
override public function set data(value:Object):void { if(value != null) { super.data = value; if(TreeListData(super.listData).hasChildren) { setStyle("color", 0x660099); setStyle("fontWeight", 'bold'); } else { setStyle("color", 0x000000); setStyle("fontWeight", 'normal'); } } }
"" , . .
Source: https://habr.com/ru/post/1737851/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1737846/how-to-minor-updates-to-drupal-6-with-shared-hosting&usg=ALkJrhiznKWi0WpoYgAoMGUPNrcR3PCEpwПараметры конструктора для зависимых классов с Unity Framework - designWhat to do if snapshots from GMap memory cards are not available - javascriptAssociate "Code / Properties / Material" with fields in C # without reflection. I am too indoctrinated Javascript - javascriptWhat tool can I use to test my web application in different resolutions? - cssASP.NET MVC: how to pass more than one object to the View method? - objectHow do you fix the Silverlight application bias that occurs in Firefox? - firefoxI need help with my assignment in C ++ using Microsoft Visual C ++ - c ++How can I get the approximate time elapsed from some timestamp? - datetimeDjango EmailField and full email address with first and last name - djangoAll Articles