Flex - 3-state "expanded", "collapsed" And "semi-expanded" Tree Control?
Aug 23, 2010
What I'm trying to do is have a 3 state tree expansion. I have three different icons for "expand" "collapse" "semi-expanded" which I want to use to show a partially populated tree control with all nodes initialized to semi-expanded state and then on clicking the "semi-expanded" icon it gets data from server and populates the tree and open that branch with "expanded" icon.
I tried looking for it but couldn't find anything close to it except the 3-state checkbox but don't know how to use it on 3 state icon when tree would only maintain 2 states.
View 2 Replies
Similar Posts:
May 28, 2011
I am looking for the function or event, which is called when tree node is expanded/colapsed inside Tree object in Flex 4.5.
View 1 Replies
Dec 30, 2011
How to tween/add effects for the action of tree expanding/collapsing in an AdvancedDataGrid in flex.
I googled a bit, searched the livedocs, but there doesn't seem to be a concrete example for the same.
View 1 Replies
Jun 24, 2009
I have a partially populated Tree component and I have to invoke a remote service when User expand (not when he select) a node to retrieve it's leafs. How I know witch node have bee selected.
I'm using Flex 3.3.
View 1 Replies
Dec 27, 2010
The tree should have a minimum row count of 4 and a maximum of 10 (beyond which it should display the scroll bars). So, I have a tree with rowCount="4" and I want rowCount to change up to "10" depending on the currently expanded nodes. In debug I can see two of the tree's properties which I could use[code]...
But these are not accessible from outside so I can't find a way to understand if the tree is expanded or not.
View 1 Replies
Feb 11, 2011
I have added an event handler for itemOpening event for the tree component inside the handler basically ido myTree.selectedItem = event.item ; and then add the new data inside myTree.selectedItem.children.push(newData); But It do not show simultaneously instead I have to close , open the branch again to see the new data. I think I need to refresh something after adding new data but dont know what? below is the code but without the declaration , script tag etc
<services:DocumentService id="$document"/>
<s:CallResponder id="$newFolderAdded" result="$newFolderAdded_resultHandler(event)"/>
[Code]....
View 1 Replies
May 12, 2005
I have included my fla at [URL]. What I want is when you click on a bar it expand and pushes the ones below down. That has been accomplished. However, I want the expanded bar to close when a different bar is clicked. Right now that doesn't happen. The only way to close an expanded bar is to click on itself. I should add that there is code on an invisible button that resides inside the bar movie clip.
View 2 Replies
Nov 9, 2011
I have a drop-down/multi-level CSS menu on a page. The menu however doesn't appear over a flash.i put <param value="transparent" name="wmode"/> I added wmode="transparent" to the EMBED tag then the expanded menu appeared but the color of flash image diaappeared also tried z-index in css.
[Code]...
View 4 Replies
Aug 26, 2009
I have a question, not necessarily about coding, but about setting up a file. I want to create an expandable ad, but I don't know how they work. Do I make the stage the size of the expanded part? How do I only have the unexpanded part act as though it is a different, smaller size.
View 2 Replies
Jul 21, 2009
I need the Flex tree control by default open... where all nodes are visible.[code]...
View 3 Replies
Mar 24, 2011
I 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].....
View 2 Replies
Aug 20, 2010
I am currently developing a dynamic LineChart in FLEX 4.I am implementing a Tree control next to my LineChart, which will filter the LineChart dataprovider and lineseries. The tree control has several branches and ultimately 5 children (leaf nodes) at the bottom of the last branch.I need the leaf node/children to be displayed as checkboxes inside the tree control.As I understand,this will require overrides in the TreeItemRenderer class.This is where I am a little confused on how to implement that.Currently I can distinguish between leaf and branches using this code, in my main MXML component.I added this because it may be helpful to some beginning FLEXdevelopers, such as myself, who cannot easily find this functionality documented well:
private function treeClick(e:ListEvent):void {
_selectedItem = Tree(e.currentTarget).selectedItem;
if(mainTree.dataDescriptor.isBranch(_selectedItem)) {[code].....
I am looking at the TreeItemRenderer override class from the following example here: In the example, they override the "createChildden" super function to add checkboxes to the tree control.My question is, can I override the createChildren function directly in my MXML component, and not have to use an entire class file to override this functionality? Must I re-invent the wheel to do this?Also, how can I distinguish that my treeItem is a leaf node and not a parent, in the override function? I only want to add checkboxes to the leaf nodes, how can I differentiate? The following example adds checkboxes to all branches and leaf nodes, but I want to add checkboxes only to leaf node/children. How would you approach that?
override protected function createChildren( ): void
{
super.createChildren( );[code]............
Here is my tree tag:
<mx:Tree id="mainTree" dataProvider="{treeData}" itemRenderer="TreeCheckBoxItemRenderer" labelField="@label" showRoot="false" width="100%" height="100%" itemClick="treeClick(event)" />
View 1 Replies
Apr 9, 2012
Im trying to populate a tree control with an external xml file brought in via arraycollection but i need to group the xml data to display in the tree Okay my external xml file is called parts.xml and it looks like this:
[Code]...
additionally what i intend is for the user to have huge tree of parts and they select a node at the partnumber level and drag an drop it on to a datagrid where all the other tags of the part gets displayed.
Ive tried and tried many things without any luck. even now im thinking maybe if i looped through the array-collection and created a new array just for the tree to get it to display the way i need it, then when the user dragged and drop a part onto the grid i would have code that would look for that part number in the original arraycollection and add it to a new array just for the datagrid... i still dont know how i would create that new array for the tree!! cause the xml data is grouped by partgroup and then grouped again by parttype before you get the individual part numbers
View 1 Replies
Jan 20, 2010
I'm doing a drag and drop operation on a tree using some help from Adobe's quick Starts:[URL]
The code suggested is roughly this:
var dropTarget:Tree = Tree(evt.currentTarget);
var i:int = dropTarget.calculateDropIndex(evt);
myTree.selectedIndex = i;
[Code].....
EDIT: I forgot to post that my current workaround is setting the selectedIndex = -1 after I get my node:XML. I'm afraid that if something bogs on the processor the user may see it select then deselect.
View 2 Replies
Mar 9, 2010
I have a tree control and I want to give the user the ability that he can move up and down the element he just selected with a up and a downbutton. The tree gets generated from XML. I managed to insert the selected item a second time at a other place, with the following code:
var parentXML:XML = XML(containerTree.selectedItem).parent();
var upperItem:XML = topContainer.source[containerTree.selectedIndex-1];
parentXML.insertChildBefore(upperItem,XML(containerTree.selectedItem));
but then I have the item there twice in the List. How can I remove to reinsert it?
View 1 Replies
Jan 27, 2010
I have a Tree Control on which I let user add some nodes. When a node gets added I want to let the user edit the added control right away. How do I get the itemEditorInstance of a just added xml node?
View 1 Replies
Jul 14, 2010
Does anyone know of a way to specify different vertical gaps between siblings in a Tree? I want to child nodes spaced tighter together (maybe 10px) while the top level parents remain spaced further apart (20px). Essentially, I need to change the gap dynamically based upon the depth of the node, but I'm not sure if the Tree class (or the List class, which Tree extends) offers this type of functionality.
View 2 Replies
Aug 8, 2010
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 Replies
Jan 20, 2011
Latest_News_Display is under the Latest_News state. I want to set Latest_News_Display's x property even if the currentState is set to Intro. However, when I try to use Latest_News.Latest_News_Display.x = 10,it returns an error that says 1120: Access of undefined property Latest_News
View 1 Replies
Sep 24, 2010
I've created an mxml page that displays a tree control, however the data is only being displayed as branches. Even items that are leaves are being displayed as branches.
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
public function init():void {
var item:Object;
var array:Array = new Array();
[Code] .....
View 1 Replies
Nov 4, 2009
I'm using a tree control that I want to customize. The data items in the tree's dataProvider have a property name that should be used for labeling the node, and a property type that should be used to select one of several embedded images for use as an icon. The simplest way to do this is by using the labelField and iconFunction properties.
However, I wanted to get started with item renderers and open the door for adding more complex customization later, so I tried making my own item renderer. I extended the TreeItemRenderer class as follows and used it in my tree control:
class DirectoryItemRenderer extends TreeItemRenderer
{
[Embed("assets/directory/DefaultIcon.png")]
private static var _DEFAULT_ICON:Class;
[Code]....
This code has no effect whatsoever, icon and label in the tree control remain at their defaults. Using trace(), I verified that my code is actually executed.
View 2 Replies
Dec 9, 2009
just facing a difficulty with tree control drag drop..Suppose i have tree with drag-drop enabled.I want to which node(id) is droped inside which node. 1]if i drag "Cat1" node inside "Cat3",i want to identify ids of siblings of "cat1",and "cat3".2]in general i want to know the ids of current element being moved along withits new parent and new position and save these postions.3] Also "cat4" when moved outside "cat3",i want know its position and its siblings id.
<mx:XML id="treeDP">
<node label="Categories">
<node label="Cat1" id="1" isBranch="true"/>
[code].....
View 2 Replies
Mar 4, 2010
I'm trying to modifty the Flex Tree control to allow a user to select multiple items by just clicking each of the desired elements (ie I don't want them to have to press Ctrl or Shift). If the user clicks a selected item a 2nd time, it will deselect it.
View 2 Replies
Jan 17, 2010
I have a Tree Control inside my Flex Application which I want to edit on a doubleclick on a tree item. I found the properties doubleClickEnabled= "true", doubleClick="startEditMode()", and editable="true". With these functions I can detect a double click and I can change the editable property to true based on a double click. The problem is that after I double clicked on a Item i have to click once more to really enter the edit mode. That doesn't seem to be intuitive at all..
View 3 Replies
Feb 2, 2010
I'm trying to populate a mx:tree component with values that I'm getting from BlazeDS. The returned data from BlazeDS is fine it's an ArrayCollection of Folder value objects.I've been instructed to use Cairngorm for this project. I'm pretty new to Flex and Cairngorm. According to the limited documentation that I've read online I should populate the model with data so I've stuck the array collection there.What I'm stuck with is trying to update the tree component. I feel that I need some way to notify the container component for the tree that the data (i.e. the subfolders) is available on the model. I was hoping that it would be possible to fire a function in the container component to add the subfolders as children of the selected node (I could chuck this on the model before the remote object call I guess) then fire tree.invalidateList() and tree.validateNow(). Any ideas?
View 1 Replies
Mar 25, 2011
I have two datagrids 1. OPTION GRID and 2. ELECTION GRID. I have used VBox container as itemRenderer in ELECTION GRID which consists of TextInput in Description Column. The following is the sample SWF.
Whenever the checkbox is selected in the OPTION GRID i have to add a corresponding text input with description value in the 2nd grid (ELECTION GRID) for all the rows. Suppose if two checkboxes are selected, i have to add two textinput in the 2nd grid and so on... This is working fine. But whenever if i edit the textinput and scrolled up or down, the value gets collapsed between the rows or get vanished. I suspect that the itemRenderers will be re-used for the other rows while scrolling. How to retain the edited value in textinput ?
The following is the code.
Main code :
<mx:VBox width="100%" height="100%">
<mx:Label text="OPTION GRID :" fontSize="12" fontStyle="normal" fontThickness="15"/>
<components:CAEventDetailDataGrid width="100%" height="20%" dataProvider="
[Code].....
The Election Event is a customised event which will be triggered and invoke the listener function addTextInput whenever the checkbox is selected/de-selected in OPTION GRID.
private function addTextInput(electionEvent : ElectionEvent) : void
Is their a way to retain the edited value in TextInput ?
View 1 Replies
Nov 19, 2011
I'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 Replies
Feb 2, 2011
Do you know any collapsible flex container that can handle dynamic content that works when pre-collapsed? I tried the CollapsiblePanel component by Arc90 for Flex, but it did not work when pre-collapsed.If I have a VBox inside the panel, and I set the "collapsed" property of the CollapsiblePanel to true, the size of the CollapsiblePanel cannot be restored. It seems like this is what is happening:
The CollapsiblePanel's collapsed property is pre-set to true in the MXML markup.
The VBox auto-adjusts its height to 0 since the CollapsiblePanel is collapsed.
When the CollapsiblePanel's collapsed property changes to false (i.e., it is expanded by the user), the VBox does not expand itself because its parent's content area is 0. Therefore the CollapsiblePanel remains at the same height because its content's height is 0.
Note: This occurs only when the CollapsiblePanel is pre-collapsed, as seen in the markup below.I've already tried this (didn't work):
<containers:CollapsiblePanel minimize="pnl_minimize(event)"
restore="pnl_restore(event)" height="100%" width="100%" collapsed="true">
<mx:VBox width="100%" height="100%" verticalGap="0">[code]....
View 1 Replies
Oct 30, 2009
I am working on Air application,i had a problem on Tree control.Iam adding nodes for the tree dynamically, while adding nodes to the tree i am setting Tree.selectedItem as present added node. after that i need to fire Tree.itemClick event handler method also.how can i call event handler method as a common method. in Flex3
View 1 Replies
Apr 9, 2011
It's my understanding that view states can be useful when switching the layout of design elements. Such as, a loading page as one state and the main application design in another state. Is this the correct use of them? Additionally, I have a label in State1 and I cannot figure out how to access that label via actionscript. labelID.text = "New Text"; is not working.
View 2 Replies