Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic GetArrowAt at MouseHover ... (Read 1617 times)
bemorem
YaBB Newbies
*
Offline


MacPro Xeon Quad

Posts: 44
Joined: May 3rd, 2007
GetArrowAt at MouseHover ...
Dec 9th, 2008 at 7:33am
Print Post  
Code
Select All
	  private void tmrHover_Tick(object sender, EventArgs e)
	  {
		if (IsInfo == true)
		{
		    tmrHover.Stop();

		    Point clientPoint = fcDepot.PointToClient(MousePosition);
		    PointF docPoint = fcDepot.ClientToDoc(clientPoint);

		    Box bb = fcDepot.GetBoxAt(docPoint);
		    if (bb != null)
		    {
			  //box.Text += "beep ";
			  bb.ToolTip = "Node ID:" + bb.Tag;
		    }
		    Arrow aa = fcDepot.GetArrowAt(docPoint, 3.0F);
		    if (aa != null)
		    {
			  //box.Text += "beep ";
			  aa.ToolTip = "Link ID:" + aa.Tag;
		    }
		}
	  }
 



In box, tooltip is good showing, but In arrow, tooltip is not shown.

What's wrong in above code?
  

HW: MacPro Xeon Quad/ 4GB RAM&&OS: WinXP sp3 / .NET 3.5&&Dev: VS 2008 C# sp1&&flowchart .Net ver 4.3.x&&
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GetArrowAt at MouseHover ...
Reply #1 - Dec 9th, 2008 at 8:58am
Print Post  
The Tooltip control might not refresh itself before the mouse moves. You could set the ToolTip value when the Arrow object is created, that's it if you don't need to change it dynamically.
  
Back to top
 
IP Logged
 
bemorem
YaBB Newbies
*
Offline


MacPro Xeon Quad

Posts: 44
Joined: May 3rd, 2007
Re: GetArrowAt at MouseHover ...
Reply #2 - Dec 10th, 2008 at 12:07am
Print Post  
The tooltip must shown at if(IsInfor==true) only.

so, after ArrowCreate tooltip assign is not good.

  

HW: MacPro Xeon Quad/ 4GB RAM&&OS: WinXP sp3 / .NET 3.5&&Dev: VS 2008 C# sp1&&flowchart .Net ver 4.3.x&&
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GetArrowAt at MouseHover ...
Reply #3 - Dec 10th, 2008 at 5:44am
Print Post  
If IsInfo is some global flag for your application specifying whether tooltips should show, you could also set the DiagramView.ShowToolTips property when setting IsInfo.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint