buy now
log in
MindFusion

Q: Is there any event raised after moving a shape? We maintain some state related to the position of the shapes in the control and need to know when they are moved?

A: The NodeModified event is raised when moving or resizing a node. Check the AdjustmentHandle event argument to find out exactly what happened. If it is AdjustmentHandles.Move, the node has been moved.

Q: I am trying to get the FlowChart.NET control to behave as a drop target by setting AllowDrop to true on the instance of the DiagramView control in my form. It looks like (based on the feedback from the mouse cursor) that the control is not responding as a drop target. What should I do?

A: You must also handle the DragOver and DragDrop events:

diagramView_OnDragOver...
{
// for mouse feedback
e.Effect = DragDropEffects.Copy; 
}
 
diagramView_OnDrop...
{
//get the dragged data and apply 
//it to the diagram as you need
}

Q: Can I force ResizeToFitItems each time an item is moved on the diagram?

A: You could enable the Diagram.AutoResize property instead of calling ResizeToFitItems in response to event handlers.

Q: The SelectionMoved event appears only to work when there are 2 or more items selected, and not for a single item. Is there another event or a property that will recognize a single object as a selection?

A: SelectionMoved is raised only for multiple-selection. You should handle some more events, such as NodeModified, and LinkModified if you need to detect the modification of a single item.

Q: I need to detect double clicks on a table row, however the NodeDoubleClicked event appears only to fire when the table header is clicked, and not the rows. How can I implement this when any part of the table is clicked?

A: Handle CellDoubleClicked, it will be raised when a table cell is double clicked. Check the cell's Row property to determine which row has been clicked.

Copyright © 2001-2024 MindFusion LLC. All rights reserved.
Terms of Use - Contact Us