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.
Unfortunately, activation email could not send to your email. Please try again.

Scrolling in Syncfusion Diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

57318 Mar 1,2007 07:22 AM Mar 7,2007 05:50 PM Windows Forms 4
loading
Tags: Diagram
Satya Kolachina
Asked On March 1, 2007 07:22 AM

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


J.Nagarajan [Syncfusion]
Replied On March 1, 2007 08:13 PM

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.Nagarajan [Syncfusion]
Replied On March 6, 2007 06:21 PM

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.Nagarajan [Syncfusion]
Replied On March 6, 2007 06:35 PM

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

Satya Kolachina
Replied On March 7, 2007 05:50 PM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;