Select to view content in your preferred language

Removing the Tree Node Expansion from the operational map layer( more...)

1829
7
Jump to solution
06-20-2012 11:29 AM
by Anonymous User
Not applicable
I would like to know if there is a way the remove the tree-node expansion to where you cannot expand the tree to view the sub layers for the operational layers set in the config file.  When the expansion is removed when the layer is checked i would like it to select each sub-layer as well.  I appreciate the help in advance.

[ATTACH=CONFIG]15376[/ATTACH]


Ray
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Honored Contributor
Ray,

Ignore my waffle above, in the LayerListWidget.mxml scroll down to the bottom and change the following:

<toc:TOC id="toc" width="100%" height="100%" />


to

<toc:TOC id="toc" width="100%" height="100%" disclosureClosedIcon="{null}" disclosureOpenIcon="{null}" />


This will remove the arrows

In TOC.as file also comment out the contents of the function onItemDoubleClick this will stop the user from opening the tree by double clicking the layer name

Regards

Anthony

View solution in original post

0 Kudos
7 Replies
AnthonyGiles
Honored Contributor
Ray,

The TOC expands the flex tree control so I am not sure if you can remove the arrow totally as this would go against the whole purpose of the control. You can change the icon used so maybe just put a transparent image there, see:

http://www.flex-blog.com/change-open-and-close-icons-on-flex-tree/

You can also change/remove the folder (leafs) icons:

http://blog.flexexamples.com/category/halo/tree/

As for having all your layers turn on when you select the top checkbox just turn them all on in your mxd before you publish it to the server. Then when you add the operational layer set its visible tag to false. That way the user will only have to turn on the one check box.

Regards

Anthony
0 Kudos
AnthonyGiles
Honored Contributor
Ray,

It looks like the arrow is called the disclosureicon:

http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_06.html

you should be able to set it on the tree not to be visible e.g. disclosureIcon.visible = false
0 Kudos
AnthonyGiles
Honored Contributor
Ray,

Ignore my waffle above, in the LayerListWidget.mxml scroll down to the bottom and change the following:

<toc:TOC id="toc" width="100%" height="100%" />


to

<toc:TOC id="toc" width="100%" height="100%" disclosureClosedIcon="{null}" disclosureOpenIcon="{null}" />


This will remove the arrows

In TOC.as file also comment out the contents of the function onItemDoubleClick this will stop the user from opening the tree by double clicking the layer name

Regards

Anthony
0 Kudos
by Anonymous User
Not applicable
Great Anthony,
That work!!!  Thanks a lot.  I do have one other question for you.  Is there a way to remove just one expander?

Ray
0 Kudos
AnthonyGiles
Honored Contributor
Ray,

From what I can see its all or nothing, I can't see anyway of changing the disclosure icons for individual children of the tree.

Don't forget to mark the post above as answered,

Thanks

Anthony
0 Kudos
by Anonymous User
Not applicable
Thank you sir!!  I appreciate the help!
0 Kudos
RhettZufelt
MVP Notable Contributor
anyone know how to remove/hide the little drop down menu arrow on the right?

I have figured out how to remove the items from within it (Move up, Move down, etc), but can't figure out how/where to hide the icon itself.

Thanks again,

R_
0 Kudos