Click here to Skip to main content
15,440,179 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help on this issue with WebBrowser control Pin
Sijin18-Oct-02 4:37
MemberSijin18-Oct-02 4:37 
QuestionIn COM+ environment, my value-object needs support strongly named assembly and others? Pin
17-Oct-02 16:18
suss17-Oct-02 16:18 
QuestionHow can I detect when a context menu is displayed Pin
Darryl Borden17-Oct-02 10:46
MemberDarryl Borden17-Oct-02 10:46 
AnswerRe: How can I detect when a context menu is displayed Pin
Wjousts17-Oct-02 16:27
MemberWjousts17-Oct-02 16:27 
GeneralRe: How can I detect when a context menu is displayed Pin
Darryl Borden18-Oct-02 5:11
MemberDarryl Borden18-Oct-02 5:11 
GeneralToolTip for TreeView nodes Pin
kavehdr17-Oct-02 10:40
Memberkavehdr17-Oct-02 10:40 
GeneralRe: ToolTip for TreeView nodes Pin
Russell Morris17-Oct-02 12:23
MemberRussell Morris17-Oct-02 12:23 
GeneralRe: ToolTip for TreeView nodes Pin
Patrick Lassalle17-Oct-02 13:06
MemberPatrick Lassalle17-Oct-02 13:06 
In the following example, I use a Tootip control and I create a new class derived from the TreeNode class. This class contains a Tooltip property. And I display the tooltip when receiving the MouseMove event, using the GetNodeAt method to know what is the node pointed by the mouse.

using System;
using System.Drawing;
using System.Windows.Forms;

class TreeViewWithTooltip: Form
{
private ToolTip m_tooltipCtrl = null;

public static void Main()
{
Application.Run(new TreeViewWithTooltip());
}

public TreeViewWithTooltip()
{
Text = "Tree View with tooltip";
m_tooltipCtrl = new ToolTip();

TreeView tree = new TreeView();
tree.Parent = this;
tree.Dock = DockStyle.Fill;
tree.ShowLines = true;
tree.MouseMove += new System.Windows.Forms.MouseEventHandler(tree_MouseMove);

MyTreeNode myTreeNode1 = new MyTreeNode("This is node 1");
myTreeNode1.Text = "node1";
tree.Nodes.Add(myTreeNode1);
MyTreeNode myTreeNode11 = new MyTreeNode("This is node 11");
myTreeNode11.Text = "node11";
myTreeNode1.Nodes.Add(myTreeNode11);
tree.ExpandAll();
}

private void tree_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
TreeView tree = (TreeView)sender;
MyTreeNode myTreeNode = (MyTreeNode)tree.GetNodeAt(e.X, e.Y);
m_tooltipCtrl.SetToolTip(tree, myTreeNode != null ? myTreeNode.Tooltip : null);
}
}

class MyTreeNode : TreeNode
{
private string m_tooltip;
public MyTreeNode(string tooltip)
{
m_tooltip = tooltip;
}
public string Tooltip
{
get { return m_tooltip; }
set { m_tooltip = value; }
}
}
GeneralRe: ToolTip for TreeView nodes Pin
kavehdr17-Oct-02 15:57
Memberkavehdr17-Oct-02 15:57 
GeneralDelete files that are in use Pin
Ola Carlsson17-Oct-02 8:57
MemberOla Carlsson17-Oct-02 8:57 
GeneralRe: Delete files that are in use Pin
Paul Riley17-Oct-02 9:54
MemberPaul Riley17-Oct-02 9:54 
GeneralRe: Delete files that are in use Pin
JasonSmith18-Oct-02 13:21
MemberJasonSmith18-Oct-02 13:21 
GeneralRe: Delete files that are in use Pin
Paul Riley18-Oct-02 13:39
MemberPaul Riley18-Oct-02 13:39 
GeneralExibiting more control over remote assembly download Pin
Richard Smith17-Oct-02 4:25
MemberRichard Smith17-Oct-02 4:25 
GeneralRe: Exibiting more control over remote assembly download Pin
Russell Morris17-Oct-02 7:54
MemberRussell Morris17-Oct-02 7:54 
GeneralRe: Exibiting more control over remote assembly download Pin
Richard Smith17-Oct-02 11:37
MemberRichard Smith17-Oct-02 11:37 
GeneralClickety Police! Pin
David Stone17-Oct-02 12:04
sitebuilderDavid Stone17-Oct-02 12:04 
QuestionMFC to C# ?? Pin
-Dy17-Oct-02 2:44
Member-Dy17-Oct-02 2:44 
AnswerRe: MFC to C# ?? Pin
Michael P Butler17-Oct-02 2:48
MemberMichael P Butler17-Oct-02 2:48 
GeneralRe: MFC to C# ?? Pin
-Dy17-Oct-02 2:54
Member-Dy17-Oct-02 2:54 
GeneralRe: MFC to C# ?? Pin
Paul Riley17-Oct-02 3:07
MemberPaul Riley17-Oct-02 3:07 
GeneralRe: MFC to C# ?? Pin
Michael P Butler17-Oct-02 3:24
MemberMichael P Butler17-Oct-02 3:24 
AnswerRe: MFC to C# ?? Pin
Stephane Rodriguez.17-Oct-02 3:48
MemberStephane Rodriguez.17-Oct-02 3:48 
GeneralRe: MFC to C# ?? Pin
KaЯl17-Oct-02 11:14
MemberKaЯl17-Oct-02 11:14 
GeneralRe: MFC to C# ?? Pin
Stephane Rodriguez.17-Oct-02 20:23
MemberStephane Rodriguez.17-Oct-02 20:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.