473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Xml node in ToolTip

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_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e){
string strTemp="";
int i=0;
TreeNode tn = this.tvTreeView.GetNodeAt(e.X, e.Y);
if(tn !=null) {
int currentNodeIndex = tn.Index;
if (tn.Text !="subreport") return;
if(currentNodeIndex != oldNodeIndex){
oldNodeIndex = currentNodeIndex;
if(this.tooltipGeneral != null && this.tooltipGeneral.Active)
this.tooltipGeneral.Active = false; //turn it off
XmlDocument sourceDoc = new XmlDocument();
sourceDoc.Load(this.txtFilename.Text);
XmlNodeList subreportNodes = sourceDoc.DocumentElement.ChildNodes;
foreach (XmlNode subreportNode in subreportNodes)
{
if ( i==currentNodeIndex)
{
strTemp=subreportNode.InnerXml;
break;
}
}
else i++;
}
this.tooltipGeneral.SetToolTip(this.tvTreeView, strTemp);
this.tooltipGeneral.Active = true; //make it active so it can show
}
}
}

Nov 12 '05 #1
0 2410

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dmitry Karneyev | last post by:
Hi! How to add tooltip to a TreeView node? Thanks for any advice! Dmitry.
0
by: Yves Royer | last post by:
Hi, I'm currently writing an application (in VS 2005 bèta 2) and made some own user controls. In each user control I added a ToolTip object so i can set some tooltips on checkboxes etc. What...
0
by: Yves Royer | last post by:
Hi, My first post didn't show up so here's a second try. I'm currently writing an application (in VS 2005 bèta 2) and made some own user controls. In each user control I added a ToolTip object...
0
by: Jaime Stuardo | last post by:
Hi all... I have a TreeView in my form. When the page is shown in the browser and I move the mouse over the nodes, in status bar appears a call to JavaScript:doPostBack. I want other text to be...
5
by: =?Utf-8?B?cGV0ZTE5Njk=?= | last post by:
I use Visual Studio 2005 and created a very simple Form with one button. I added a Tooltip for that button. It shows fine the first time I hover over that button. But if I let it disappear by the...
1
by: Richard | last post by:
I'm trying to mimic how the TreeView shows a full text inplace tooltip when the mouse hovers over of TreeView node whose text is truncated due to skinny form or panel. In the IDE I have...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
3
omerbutt
by: omerbutt | last post by:
hi there i have downloaded a prototype tooltip from http://www.nickstakenburg.com/projects/prototip/ the logic it uses is to call the script after creating the <div> for example i am using the...
16
by: Charles Law | last post by:
I have to take this personally now. Tooltips have been flakey since the dawn of .NET, but to still have to put up with a disappearing tooltip in VS 2008 is getting beyond a joke. Tooltips have...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.