Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How can I stop a node being dragged off screen? (Read 1345 times)
brianh
YaBB Newbies
*
Offline



Posts: 30
Joined: Jul 1st, 2008
How can I stop a node being dragged off screen?
Jul 16th, 2008 at 10:44am
Print Post  
Hi,

I need to prevent nodes from being dragged of the top or left edges of the screen, any ideas how best to handle this?

Thanks.

Brian
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How can I stop a node being dragged off screen
Reply #1 - Jul 16th, 2008 at 12:39pm
Print Post  
Hi,

By default the control shouldn't let users drop items off the diagram.Bounds area. That's set through the Diagram.RestrictItemsToBounds property. If what you need is to disable auto-resizing to the left and top, set Diagram.AutoResize = RightAndDown.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
brianh
YaBB Newbies
*
Offline



Posts: 30
Joined: Jul 1st, 2008
Re: How can I stop a node being dragged off screen
Reply #2 - Jul 16th, 2008 at 12:53pm
Print Post  
Hi Stoyan,

My problem was that the node caption could be dragged off screen (even though some of the node was still visible), and since my nodes can only be dragged by their caption this meant that I could never drag it back on.

Changing the Diagram.RestrictItemsToBounds property to InsideOnly fixed the problem. Smiley

Thanks.

Brian
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint