Customer's question:
Is there a way to add hover thumbnails to each item in a Treeview?
Public Treenode browseserver (treenode rootnode, String Path)
{
Directoryinfo di = New Directoryinfo (PATH );
Directoryinfo [] dicollection = Di. getdirectories ();
Foreach (Directoryinfo de In Dicollection)
{
Treenode TN= NewTreenode (De. Name, De. fullname );
Rootnode. childnodes. Add (TN );
Browseserver (TN, De. fullname );
}
Fileinfo [] ficollection = Di. getfiles ();
Foreach (Fileinfo fe In Ficollection)
{
Treenode TN= NewTreenode (Fe. Name, Fe. fullname );
Rootnode. childnodes. Add (TN );
}
Return Rootnode;
}
Thanks in advance.
Answer:
HiDivided
I suggest you try the following way, hope this helps
Change your code:
Treenode Tn =NewTreenode (De. Name, De. fullname );
Rootnode. childnodes. Add (TN );
To the following code:
String strname = " <a onmouseover = " Showthepic (Control) " Onmouseout = " Hide (Control) > " ;
Strname + = De. Name;
Strname + = ""
Treenode TN = New Treenode (strname, De. fullname );
Rootnode. childnodes. Add (TN );
To dynamically generate a tree, you must implement the serverCodeIn collaboration with client code, embedded HTML tag is a good choice