Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Scrollbar in DiagramView (Read 4647 times)
SE
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jun 5th, 2015
Scrollbar in DiagramView
Jul 28th, 2015 at 9:20pm
Print Post  

Hi, I need to set-up a vertical and horizontal scrollbar in my diagram view or diagram component.
I see the vertical scrollbar by default. However it is not going all the way down to see the entire chart (my rendered chart is huge).

I used diagramview properties such as diagramView.ScrollX, ScrollY, scrollTo, etc. Nothing seem to work for me..

My graph is huge and I need to drag or scroll to X and y direction to see the entire flow diagram. Can you pls help me.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scrollbar in DiagramView
Reply #1 - Jul 29th, 2015 at 5:39am
Print Post  
Hi,

Scrollbar range depends on Diagram.Bounds size. You could assign a larger rectangle to it, or call the ResizeToFitItems method after creating diagram elements. If you are applying some automatic layout, setting its GrowToFit property should resize Bounds to fit arranged items too.

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


I Love MindFusion!

Posts: 21
Joined: Jun 5th, 2015
Re: Scrollbar in DiagramView
Reply #2 - Jul 29th, 2015 at 2:52pm
Print Post  
Thank you! I used diagram1.ResizeToFitItems(1000);
and it helps to scroll horizontally and also vertically. But the flowchart diagram sits in the middle of the page. so I scroll to top right or left, i just see blank page. I want my diagram to fit into the layout and should not have any blank space. So should i have to set GrowToFit as true? Or should I align the diagram into topRight corner. if yes, which property to use. Please advise.

Here is my code:


layout.Orientation = MindFusion.Diagramming.Layout.Orientation.Horizontal;
layout.SplitLayers = true;
layout.LayerDistance = 10;
layout.Arrange(diagram1);
diagram1.ResizeToFitItems(1000);
« Last Edit: Jul 29th, 2015 at 5:03pm by SE »  
Back to top
 
IP Logged
 
SE
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jun 5th, 2015
Re: Scrollbar in DiagramView
Reply #3 - Jul 29th, 2015 at 5:12pm
Print Post  
Actually now I changed diagram1.ResizeToFitItems(1000);
to diagram1.ResizeToFitItems(10); and looks like the diagram starts from top left and not much blank space.

However, how would like to know about Growtofit andAlign the diagram in topleft.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scrollbar in DiagramView
Reply #4 - Jul 29th, 2015 at 5:43pm
Print Post  
The ResizeToFitItems argument specifies size of margin space added to the rectangle that bounds all items. The GrowToFit option uses Layout.Margins value for same purpose.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint