Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Container expand/collapse hit test? Cursor? (Read 1417 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Container expand/collapse hit test? Cursor?
Jan 8th, 2013 at 5:57pm
Print Post  
Is it possible to customize the hit test area of a container's expand/collapse button? We would like to make the active hot spot a little bigger.

Also, can the mouse cursor be customized when it is over this hotspot area?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Container expand/collapse hit test? Cursor?
Reply #1 - Jan 8th, 2013 at 6:55pm
Print Post  
At this time it depends only on the container's CaptonHeight property, so you might set it to a larger value. Changing the cursor can be done from MouseMove handler:

Code
Select All
private void diagramView_MouseMove(object sender, MouseEventArgs e)
{
	diagramView.OverrideCursor = null;
	var point = diagramView.ClientToDoc(e.Location);
	var ctr = diagram.GetNodeAt(point) as ContainerNode;
	if (ctr != null)
	{
		var rect = ctr.Bounds;
		if (point.X > rect.Right - ctr.CaptionHeight &&
			point.Y < rect.Top + ctr.CaptionHeight)
			diagramView.OverrideCursor = Cursors.Cross;
	}
} 



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