void FTreeViewMouseMove(object sender, MouseEventArgs e) { if (!ShowTooltip) { return; } var treeNode = FTreeView.GetNodeAt(e.Location) as MapperTreeNode; if (treeNode != FLastTooltipNode) { InvalidateTreeNode(FLastTooltipNode); FLastTooltipNode = treeNode; InvalidateTreeNode(FLastTooltipNode); if (treeNode != null) { var mapper = treeNode.Mapper; if (mapper.CanMap <IDescripted>()) { string tip = mapper.Map <IDescripted>().Description; if (!string.IsNullOrEmpty(tip)) { FToolTip.Show(tip, FTreeView, e.X + 15, treeNode.Bounds.Y + 30); return; } } } HideToolTip(); } }
void FTreeViewMouseDown(object sender, MouseEventArgs e) { HideToolTip(); var treeNode = FTreeView.GetNodeAt(e.X, e.Y) as MapperTreeNode; if (treeNode != null) { var mapper = treeNode.Mapper; //middle mousebutton is not handled in TreeViewNode_MouseClick, so do it here //as it is also obviously not handled in TreeView_MouseClick if (e.Button == MouseButtons.Middle) { OnClick(mapper, e); } else { OnMouseDown(mapper, e); } } }