Two views sharing same document


This is for GoWeb.

I tried the following thinking View2 will show only

View1’s document from Y=100 onwards.

View1.DocPosition=new PointF(0,0); View2.Document=View1.Document;

View2.DocPosition= new PointF(0,100) ;

But View2 is always showing the entire document of View1

There is no scaling done in either views.

I just tried adding the following lines at the appropriate places, and found that it worked just fine:
<GoWeb:GoView id=“MyView2” Width=“300” Height=“200” Runat=“Server”/>
void InitializeView2(Object sender, EventArgs evt) {
MyView2.Document = MyView.Document;
MyView2.DocPosition = new PointF(200, 0);
MyView2.DocScale = 0.7f;
private void Page_Load(object sender, System.EventArgs e) {
MyView2.SessionStarted += new EventHandler(InitializeView2);
. . .
Changing the GoView.DocScale should work regardless, but perhaps changing the DocPosition didn’t have any effect because the document’s size wasn’t big enough for it to actually be able to “scroll” that far. In other words, either set the DocPosition after you have initialized the (shared) document with your diagram, or set the GoDocument.Size ahead of time to something big enough.

Got it to work.

The size of the document is the problem

It has to be big enough to have the second view

start at that point.