I am showing the InnerXml of a node (in a treeView Control) in a tooltip
,but it is not formatted well ,all the elements after each other ,is there a
way to format the innertext in a tooltip.
=========Code== ========
private void tvTreeView_Mous eMove(object sender,
System.Windows. Forms.MouseEven tArgs e){
string strTemp="";
int i=0;
TreeNode tn = this.tvTreeView .GetNodeAt(e.X, e.Y);
if(tn !=null) {
int currentNodeInde x = tn.Index;
if (tn.Text !="subreport" ) return;
if(currentNodeI ndex != oldNodeIndex){
oldNodeIndex = currentNodeInde x;
if(this.tooltip General != null && this.tooltipGen eral.Active)
this.tooltipGen eral.Active = false; //turn it off
XmlDocument sourceDoc = new XmlDocument();
sourceDoc.Load( this.txtFilenam e.Text);
XmlNodeList subreportNodes = sourceDoc.Docum entElement.Chil dNodes;
foreach (XmlNode subreportNode in subreportNodes)
{
if ( i==currentNodeI ndex)
{
strTemp=subrepo rtNode.InnerXml ;
break;
}
}
else i++;
}
this.tooltipGen eral.SetToolTip (this.tvTreeVie w, strTemp);
this.tooltipGen eral.Active = true; //make it active so it can show
}
}
}