Flex :: Eliminating The Folder Icon Of A Tree View Component
Apr 18, 2011does anyone knows how i could just eliminate the folder icon of a tree control and display only the leaf? supposing i have an xml structure looking this :
[Code]...
does anyone knows how i could just eliminate the folder icon of a tree control and display only the leaf? supposing i have an xml structure looking this :
[Code]...
I'm using the tree component for a little Windows Parody I'm making. In my .fla, There's a tree component that loads an external XML file. I can't figure out how to add custom icons to my component, though.I know it's possible to set the icons for just the default folder and file icons, but since it's a Windows Parody, there'll be different icons for different file types, folder types, etc.In other words, I'd like to have a different icon for every item in my Tree component.
Here are the contents of my XML file:
<node>
<node label="Desktop">
</node>
<node label="Documents">
[code]....
Also, I don't need to have an XML file loaded. If there's an easy way that does it all within Flash, please tell me. I just need to be able to handle events from the Tree.
Here i'm setting the disclosureClosedIcon as null setStyle("disclosureClosedIcon", "nullicon"); Anybody have idea about how to replace this default icon with a movieClip?
View 1 RepliesI'm trying to make a Flex Tree Component display the children of a sprite in a hierarchical way. Moreover, dragging the items on the FlexTree would resort and reparent the items. I have special Elements set as Folders. This would allow other elements to be added there as a children by dragging an element on the tree and dropping it there. I have a failed attempt which works, but breaks when I try to add folders. Basically, it fails at reparenting the items by dragging and resorting folders and that Does anyone know of a component or something which can do this, has anyone have created any of this or could anyone give me a clue?
View 1 Repliesis there any way to put scroll of tree component in left side of component or creating a custom scrollbar for tree component
View 13 RepliesI want to add an indicator on a tree node icon , meaning , for example like in eclipse when there is an error the icon get a special small indicator on the regular icon. how can i do that?
View 1 RepliesI get the folder icon, never the label. I've tried numerous datasources, always the same thing. File, ajax call, text, it always fails.
In the code below I even set a custom handler and watch the XML come in, I set a static text label going out. Never anything shown. This happens without the label function and using labelField. Yes, I'm 100% sure the attribute matches. Again, tried with numerous different datasources.[code]...
I am having some trouble with the flex Tree control.I have a control in my system and of course it is data driven.I have a group which shows a folder icon and that's fine but it also shows an expand icon when the item has no children.I don't what it to show the expand icon when the group has no children but I do want to show the folder icon, because it is different entities in my system.
View 1 RepliesBy default, the iconFunction of List and Tree return only Class as the icon, which is for embeded images or iconUtility kindly provided by this site http:[url]...... It works very well with pre-created images.But what I really want is to accept a completely runtime generate sprite object, similar to what is done by Legend, with the color changes according to what the current status. I assume I could do something to make the ListBase to accept icon argument other than Class.
View 2 Repliesi gave the tree an ArrayCollection as dataprovider that i pulled from the database, and it contains the children, but the discloser icon wont disappear on an object that doesn't have a child.i think the problem is that the renderer doesn't recognize the leaf child, wich contains a children array of length 0, or null......
View 2 RepliesHow do I prevent a user from dropping an item outsider a folder? My dataProvider is only 1-level deep.It seems that with a DragEvent handler or DragDrop handler I can find the data of the item I'm dragging, but not where I'm dropping ( so I can prevent it ).
View 1 RepliesI am not sure if it possible or what would be the best way to archive the following in Adobe Flex 4 (I am also fine with Flex 3). I need some kind of a tree view, but the items should be placed like a tree from top to down and not like it is done in the treeview implementation of the Flex framework. To make it more clear here an simple "graphic":
[Code]....
I've spend hours searching for a way to put one paragraph of text in one tree node in Adobe flex. How can I do it? I created a simple tree view but the text is cut after the right border.
So I tried to create a tree renderer. In the renderer I specified width=100 and the text wrapped. But the height of the nodes was not being calculated properly, so the text over consecutive nodes overlapped and got messed.
So how do i do wrapped text in a tree node?
I need a view of file system like this.
[Code]....
I want to create a tree view (expandable list ) in flex 4.5 builder mobile,Is it possible for web projects in flex builder for web [URL]
View 1 RepliesI'm building a top view 2D map, that it's objects are stored on the server.The kind of objects are 10 and might be a photo, label, button, lists, mix of them or labels with tooltips.The component must request the "areas" that are missing on screen.An area is 1000x1000 px and is cached in flex.To move in the map, will be like in google maps (drag-and-drop).I should be able to have another list and move objects from one to another using drag-an-drop on objects. Ex.: I grab an objects from a list and I move it on this map, I release the mouse button and the item is placed there.Now the problem is: I build a custom component for this trying to emulate the item renderer for performance and recyclage, implement drag-and-drop on objects and request the areas that are missing?
or
I extend the List component from spark and I add some features as multiple kind of itemrenderers and use recycle on them. Of course it must be able to request the missing areas on the screen and cache it's data.Maybe create a custom layout is needed too.What I need is something that must be really fluid, so the lighter this component is, the better.
UPDATE: *There will be not any object over another.
*I will not use hitTest on bitmaps because all bitmaps are wrapped in another component,as they,for now are itemrenderers.
Anyway I already begin to do this using a class that extends the SkinnableDataContainer and a custom layout. As the layout is not like a grid, is sparse, random items at diferent points(x, y).How to get the localX and localY, relative to item renderer and not to the Spark List, from a DragEvent in Flex 4?
I have a flex tree that worked perfectly fine when we set the defaultLeafIcon={null} and the folderClosedIcon and folderOpenIcon to {null}. We decided to put the icons back in and took out the nulls. Now they show up fine, but if you click on the icon instead of the label or the rest of the row, it seems to change the selected item, shows the highlight around the new item, but doesn't dispatch the ItemClick event. This makes it really hard to know that the tree's selected item has changed!
The weird part is that once you have clicked on the icon once and it looked like the selectedItem changed (or at least it applied that style), if you click the same icon again, it will actually fire the itemClick event. if you click any other icon, it does the same thing again, switching the selectedItem and styling that row, but not firing the itemClick event.
I'm trying to use the tree component in conjunction with a php page I have that produces xml. But I am literally struggling so much its ridiculous*. My php page is printing out this:
Code:
<?xml version='1.0' encoding='utf-8'?>
<folders>
[code].....
I have a tree with nodes , and a delete button , first user select the node and click this delete button , I want this node to be removed from the tree , Its not XML , every node in tree is of type Object
{label:'folder',children:[{label:'file1'}]}
I tried delete myTree.selectedItem (but compiler wont let me do it) also tried myTree.selectedItem = null (just unselects the item)and also how can I access reference to parent object of myTree.selectedItem ?
I have a Flex Tree component in my app. I set the icons for open and close.
BUT I can't find something about changing the default background-color from white to something different.
obviously there is no background-color setable in css...
I have created a MyTreeItemrenderer extending TreeItemrenderer.
However, I do not want any label, folder, disclosure icon nor icon. I want to dispaly every node of the tree with my own graphic like eg: a line, round image etc.,
How can you find out if a Flex Component (in my case the tree) is scrollable? I tried it like this
if (_listOwner.height < _listOwner.measuredHeight) {
// so stuff
}
from within the tree's item renderer but didn't succeed. Access to the tree's scrollbar is private so that I can't get the info that way.
i have a namespaced Xml structure :
<rootlevel xmlns="http://www.wigo.org/simo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wigo.org/wigo ./schemas/lexicon.xsd">
<name>simulation</name>
[Code].....
now, i have a labelFunction that passes in the xml..as an object but when i ran the programme, the tree view has each node, name, num_vars and variable as branches but the content in each of them was null and blank.
how can i properly display the namespaced XML on a tree view such that it shows every branches and elements in each branch?
private function treeLabel(item:Object):String{
var label:String = item.localName();
return label;
}
I want to customize the scrollbars on a mx|Tree component is Flex 4. I would like to mimic this functionality: [URL].
View 2 RepliesHow do I indicate the visit history on a flex tree component? I want to highlight the clicked/visited nodes to a different color and will not change after that, so that all the visited nodes will be one color. I tried adding an attribute to the underlying XML by
[Code]....
This code does retain the new color, but it also changes the color of nodes which are not visited at all. What am I doing wrong here? Is there any better way to achieve this?
Is there a way display the display list in the Tree component. I could parse the display list into xml but then I would not be able to create a reference to the display object.
View 1 RepliesI have a custom class that extends the Tree component so I can add some logic to the drag and drop functionality and not allow folders to be dropped inside folders.In the dragOver function, I am using:
var currNodeOver:TreeItemRenderer = TreeItemRenderer(indexToItemRenderer(calculateDropIndex(event)));
to determine the drop target, and setting:
[code].....
If i want check parent node checkbox means below childerns checkbox will select automatic .[code]...
View 2 RepliesI'm using the iconField property of the Flex Tree to dynamically set the icon that a node should use. This works fine for leaf nodes but for branch nodes it doesn't seem to respect my iconField and instead just shows the default folder node.
Here's a simple repro:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
[Embed("assets/icon1.png")]
[Code].....
What happens is that icon2 shows for the East and West nodes but icon1 doesn't show for the Sales node. How can I get this to work?
Is there a way to enable dragging of only leaf nodes in a tree component?
View 1 Replies