G
Guest
Anyone out there today? Happy Thanksgiving!
I am writing a Window app that has a TreeView control. I am creating the
nodes dynamically from an XML file, and I have some icon images that I have
associated with each of the "top" nodes. The users, after some usability
testing, have decided they don't want the "child" nodes to have any icons
associated.
I cannot seem to get the child nodes to NOT have an icon. I have tried
changing the index of the ImageControl the nodes are pointing to to a -1,
commenting out the assignment, etc. but they end up using the image at index
0. Here's the relevent code:
//...switch statement above this to figure out which icon index to put in
currentIcon
tempSysNode.ImageIndex = currentIcon;
sysTree.Nodes.Add(tempSysNode);
node = tempSysNode;
categoryIdentifier = tempSysInfo.systemName;
}
// Add SubSystem nodes to the TreeView, under their respective System name
currentIcon = -1; //One of the many tests
TreeNode tempSubsysNode = new TreeNode(tempSysInfo.subsystemName);
tempSubsysNode.Tag = tempSysInfo.ID;
//tempSubsysNode.ImageIndex = currentIcon; //I'VE TRIED COMMENTING THIS OUT
BUT IT DEFAULTS TO INDEX 0 WHEN I DO
node.Nodes.Add(tempSubsysNode);
DataRow newRow = systemsDataSet.Tables[0].NewRow();
//More code to figure out if there are any grandchild nodes
How do I eliminate the icons for all of the child, grandchild, etc. nodes?
WhiteWizard
aka Gandalf
MCSD.NET, MCAD, MCT
I am writing a Window app that has a TreeView control. I am creating the
nodes dynamically from an XML file, and I have some icon images that I have
associated with each of the "top" nodes. The users, after some usability
testing, have decided they don't want the "child" nodes to have any icons
associated.
I cannot seem to get the child nodes to NOT have an icon. I have tried
changing the index of the ImageControl the nodes are pointing to to a -1,
commenting out the assignment, etc. but they end up using the image at index
0. Here's the relevent code:
//...switch statement above this to figure out which icon index to put in
currentIcon
tempSysNode.ImageIndex = currentIcon;
sysTree.Nodes.Add(tempSysNode);
node = tempSysNode;
categoryIdentifier = tempSysInfo.systemName;
}
// Add SubSystem nodes to the TreeView, under their respective System name
currentIcon = -1; //One of the many tests
TreeNode tempSubsysNode = new TreeNode(tempSysInfo.subsystemName);
tempSubsysNode.Tag = tempSysInfo.ID;
//tempSubsysNode.ImageIndex = currentIcon; //I'VE TRIED COMMENTING THIS OUT
BUT IT DEFAULTS TO INDEX 0 WHEN I DO
node.Nodes.Add(tempSubsysNode);
DataRow newRow = systemsDataSet.Tables[0].NewRow();
//More code to figure out if there are any grandchild nodes
How do I eliminate the icons for all of the child, grandchild, etc. nodes?
WhiteWizard
aka Gandalf
MCSD.NET, MCAD, MCT