We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Scrolling in Syncfusion Diagram

Hello,

I bought a license of SyncFusion Windows Forms Studio 4.4, about a month ago. I am currently using SyncFusion Diagram control. I have the following questions. Both these are related to scrolling, but each of them is for a different purpose.

(a) I want to disable the default scrollbars given by the Diagram Control and implement my own custom scrolling. I want to use my own scrollbars. In this case how can I implement scrolling functionality, both vertical and horizontal scrolling?

(b) In my application, I need to keep a band of symbols docked to the top edge (not moving), which should always be displayed even if I am scrolling to the bottom of the diagram. I was able to keep the band of symbols docked to the top edge, just by disabling selection and moving by the user. But when I try to scroll the diagram to the bottom, then that band is disappearing. I want it to appear always, something like fixed rows in Excel spreadsheet.

Your prompt help is appreciated.

Thank you,
Satya S Kolachina


4 Replies

J. J.Nagarajan Syncfusion Team March 2, 2007 01:13 AM UTC

Hi

1. If your intention is to implement your own scrollbars then you can use the following code snippet

SetExternalScrollBar();

private void SetExternalScrollBar()
{
this.vScrollBar1.Height = diagram1.Height;
this.hScrollBar1.Width = diagram1.Width - 16;

this.vScrollBar1.Location = new Point(diagram1.ClientRectangle.Bottom + 16,diagram1.ClientRectangle.Left);
this.hScrollBar1.Location = new Point(diagram1.ClientRectangle.Top ,diagram1.ClientRectangle.Left);

diagram1.VScrollBar.InnerScrollBar = this.vScrollBar1;
diagram1.HScrollBar.InnerScrollBar = this.hScrollBar1;
}

I have attached the sample for your reference. You can download this sample from the following page

http://websamples.syncfusion.com/samples/Diagram.Windows/F57318/main.htm

In this sample I have used Windows ScrollBars. Please refer to it and let me know if you have any questions.

2. Regarding the second issue, I am currently working on this issue. I will update you with in a couple of days.

Thanks,
Nagaraj


J. J.Nagarajan Syncfusion Team March 6, 2007 11:21 PM UTC

Hi Satya,

The diagram does not allow the user to prevent scrolling of particular diagram area. However you can use another diagram control to set the top docked band of symbols. I have attached the sample that demonstrates this completely.

You can download this sample from the following page

http://websamples.syncfusion.com/samples/Diagram.Windows/DiagramScrolling/main.htm

Please let me know if you have any questions.

Thanks for using Syncfusion product.

Regards,
Nagaraj


J. J.Nagarajan Syncfusion Team March 6, 2007 11:35 PM UTC

Hi Satya,

The diagram does not allow the user to prevent scrolling of particular diagram area. However you can use another diagram control to set the top docked band of symbols. I have attached the sample that demonstrates this completely.

You can download this sample from the following page

http://websamples.syncfusion.com/samples/Diagram.Windows/DiagramScrolling/main.htm

Please let me know if you have any questions.

Thanks for using Syncfusion product.

Regards,
Nagaraj


SK Satya Kolachina March 7, 2007 10:50 PM UTC

Hi Nagaraj,

Thanks for researching and providing the information. I appreciate your efforts.

Before I got your reply, I already achieved what I wanted to do. As you were suggesting, I used two diagram controls for this purpose. the top diagram control hosting the non-movable symbols (scrolling completely disabled for this control) and a second diagram control instnace to actually implement scrollable diagram, with symbols that the user can interact with.

I implemented customized scrolling for the second diagram control, and through the same event handlers, I am controlling horizontal scrolling of the top diagram (and the vertical scrolling should be disabled for this control by all means, according to my requirements).

However, I will also look at your code sample to get an insight into your ideas.

Thanks a lot for the same.

Satya S Kolachina


>Hi Satya,

The diagram does not allow the user to prevent scrolling of particular diagram area. However you can use another diagram control to set the top docked band of symbols. I have attached the sample that demonstrates this completely.

You can download this sample from the following page

http://websamples.syncfusion.com/samples/Diagram.Windows/DiagramScrolling/main.htm

Please let me know if you have any questions.

Thanks for using Syncfusion product.

Regards,
Nagaraj

Loader.
Live Chat Icon For mobile
Up arrow icon