Hello:
I am using a imagelist with an ultratree. I am setting the leftimage to one of the imagelist items.
I want to compare if the leftimage of a node like this:
utvProjectView.ActiveNode.LeftImages[0] != ilProject.Images[13]
But, it does not seem to be working. How can I accomplish this?
That does not work.
UltraTree1.ActiveNode.LeftImages[0] .ToString() == "System.Drawing.Bitmap"
imageList1.Images.Keys[0] = Filename of icon (ex: pic.png)
Comparing them with != or == does not produce an error, but does produce a warning regarding comparing an object to a string.
Hello Michael,
You have to compare the Left Images as below code:
ultraTree1.ActiveNode.LeftImages[0] != imageList1.Images.Keys[0];
UltraTree1.ActiveNode.LeftImages[0] returns object of type string. All Nodes point to the same image in Memory, it will not create separate images.
Sincerely,Asma Developer Support EngineerInfragisticswww.infragistics.com/support
I am using the tree in a standard mode, and the images display fine.
What I did with the .NET trees was on a drag over event, look at what image the node had and do xyz. For instance, a command menu show event would hide certain tool items if the image was a file, but show others when it was a folder.
Like this:
if ((tempNode.LeftImages[0].Equals(ilProject.Images[9])) || (tempNode.LeftImages[0] == ilProject.Images[15]))
e.Effect =
DragDropEffects.Copy;
else
DragDropEffects.None;
This does not work though. ilProject is an imagelist I set to the trees imagelist property. If I have 100 nodes with the same image, are each pointing to the same image in memory, or are seprate images being created for every node?
Hi,
I think LeftImages are only supported in the Standard mode. If your tree is displaying as a grid or in OutlookExpress style, then you will need to create a column to display the images.