May 18, 2011, 11:57 PM
custom icons (from the famfam stock) don't show up in a TreePanel
To reproduce the problem, go the PageTreeLoader example (under TreePanels) and change the code to set a node icon:
I don't understand why you did not define the css styles of for the famfam icons in a css file that can be referenced...
protected void NodeLoad(object sender, NodeLoadEventArgs e)
{
string prefix = e.ExtraParams["prefix"] ?? "";
if (!string.IsNullOrEmpty(e.NodeID))
{
for (int i = 1; i < 6; i++)
{
AsyncTreeNode asyncNode = new AsyncTreeNode();
asyncNode.Text = prefix + e.NodeID + i;
asyncNode.NodeID = e.NodeID + i;
e.Nodes.Add(asyncNode);
}
for (int i = 6; i < 11; i++)
{
Ext.Net.TreeNode treeNode = new Ext.Net.TreeNode();
treeNode.Text = prefix + e.NodeID + i;
treeNode.NodeID = e.NodeID + i;
treeNode.Leaf = true;
treeNode.Icon = Icon.Note; // Added this line
e.Nodes.Add(treeNode);
}
}
}
The tree still shows the stock icon.I don't understand why you did not define the css styles of for the famfam icons in a css file that can be referenced...