Custom overview

Hi,

I’ve got problem with implementing custom behavior for overview. Overview implemented in Demo1 seems to do what I want, but with a little exception. I need following behavior:

  1. overview window doesn’t have any scrollbars
  2. content of document (observed) always occupies whole overview window (despite overview window size changed and document size changed)

In few words - I need overview behavior in which is present for example in Photoshop.

Any advices?


Lukasz

  1. Set some properties of your GoOverview:
goOverview1.ShowHorizontalScrollBar = GoViewScrollBarVisibility.Hide;
goOverview1.ShowVerticalScrollBar = GoViewScrollBarVisibility.Hide;
goOverview1.AutoScrollRegion = new Size(0, 0); // turns off autoscrolling
2) Implement a GoDocument.Changed event handler:
private void myDoc_Changed(Object sender, GoChangedEventArgs evt) {
if (evt.Hint == GoDocument.ChangedSize || evt.Hint == GoDocument.ChangedTopLeft) {
goOverview1.RescaleToFit();
}
}

Thanks for answer. Works.