Flowchart moving position when loaded


When I open one of my flowcharts it sometimes repositons all of the nodes and links so that you have to scroll left/down to see everything. When I save it, its in the right position, but it moves when opened again. And sometimes it creates the horizontal scroll bar when its not really necessary. I have auto scrolling enabled for the GoDocument. I have a feeling this has something to do with it, but I cant figure it out.
Any ideas?

Using Express, right?

Did you start with our Flowcharter sample?

Yes i'm using Express, and yes I started with the Flowcharter sample.

I can reproduce the same behaviour in the flowcharter sample.
The strange thing is that after its opened the flowchart in the offset position, sometimes I need to just click once on the scrollbar and it automatically repositions the document to where I want it (without needing to actually scroll). It is more noticeabale when a link on the left of the flowchart has a very long label.
What I really want is for the whole flowchart to appear in the center of the view when it is opened so that the user doesnt have to scroll everytime themselves to see everything.

For centering flowcharts, see this.

My DisplayRectangle.Size is 0,0.

Why would that be?

because i was calling CenterDocumentInView too soon, working now.

many thanks.

sorry, one more question,

after recentering, it creates a view that is bigger than necessary, adding horzontal and vertical scroll bars that are not needed. how can i resize the view/doc so that the scrollbars disappear?

The scrollbars show when the Document’s bounds are greater than can be seen in the View.


goView1.Document.Bounds = goView1.ComputeDocumentBounds();

may help if the documents bounds are bigger than they need to be to hold all the objects.