That would be great - thankyou!
Another question related to diagram scrolling:
Is there a way to have the diagram size increase when you scroll to the edge in the same was as when you drag an element off the edge of the diagram?
I'm attempting to do this by using a ScrollChanged event handler function. This checks the current view bounds and if the view is currently at the edge of the digram, it extends it.
However, it's not working as I expected, and further more, the ScrollChanged event is (understandable) not called if the diagram is zoomed out to the point where it cannot be scrolled!
My code is similar to the below, any suggestions as to a different approach would be great.
Cheers,
xan.
//snipped handler function to illustrate what I'm trying to do :)
private void diagramView1_ScrollChanged(object sender, EventArgs e)
{
PointF docPointTL = diagramView1.ClientToDoc(PointToClient(diagramView1.Bounds.Location));
float docLeft = docPointTL.X;
if (docLeft <= diagram1.Bounds.Left)
{
RectangleF bounds = diagram1.Bounds;
bounds.X -= extend;
diagram1.Bounds = bounds;
}
}