Exception using GoOverview


#1

I have a UserControl that contains a GoOverview, a Splitter, and a GoView. Think of the UI as looking exactly like Explorer with the GoOverview on the left and the GoView on the right with a splitter separating them. When I have a diagram loaded into the GoView and its overview displayed on the left, I drag the splitter all the way to the right side so only a sliver of the GoView remains. Clicking anywhere in the GoOverview results in the following:
---------------------------
Microsoft Development Environment
---------------------------
The following exception has occurred:
ArgumentException: ‘669’ is not a valid value for ‘value’. ‘value’ should be between ‘minimum’ and ‘maximum’.
---------------------------
OK
---------------------------

The call stack shows:

system.windows.forms.dll!System.Windows.Forms.ScrollBar.set_Value(int value) + 0xeb bytes
northwoods.go.dll!Northwoods.Go.GoView.UpdateScrollBars() + 0x511 bytes
northwoods.go.dll!Northwoods.Go.GoView.UpdateView() + 0x15 bytes
northwoods.go.dll!Northwoods.Go.GoView.OnPropertyChanged(System.ComponentModel.PropertyChangedEventArgs evt) + 0x44 bytes
northwoods.go.dll!Northwoods.Go.GoView.RaisePropertyChangedEvent(string propname) + 0x28 bytes
northwoods.go.dll!Northwoods.Go.GoView.set_DocPosition(System.Drawing.PointF value) + 0x72 bytes
northwoods.go.dll!Northwoods.Go.GoOverviewRectangle.OnBoundsChanged(System.Drawing.RectangleF old) + 0x60 bytes
northwoods.go.dll!Northwoods.Go.GoObject.set_Bounds(System.Drawing.RectangleF value) + 0xf2 bytes
northwoods.go.dll!Northwoods.Go.GoObject.SetSpotLocation(int spot, System.Drawing.PointF newp) + 0x5c bytes
> northwoods.go.dll!Northwoods.Go.GoObject.set_Location(System.Drawing.PointF value) + 0x13 bytes
[My assembly].dll![My class].GraphOverview.OnMouseDown(System.Windows.Forms.MouseEventArgs evt = {X=625 Y=82 Button=Left}) Line 135 C#

Note that I added the [My class] and [My assembly] items above for clarity…
Does anyone have an idea of what is causing this?


#2

Additional info:
The GoView on the right side of the window has both the ShowVerticalScrollBar and ShowHorizontalScrollBar properties set to the default value(s) of ‘IfNeeded’.
The right pane (containing the GoView) has both vertical and horiz scroll bars. The error occurs when the width of the horiz scroll bar at the bottom of the window becomes too small for the ScrollBar control to render itself properly (I think)…


#3

I just created a trivial application that has a GoOverview, a Splitter, and a GoView in it, with the overview observing the view, as I believe you are describing. There are some objects in the view.
But everything works fine, no matter how small I make the view, whether by moving the splitter over to the right as far as it will go (it won’t go all the way) or by resizing the form. The overview rectangle does look a little funny, just appearing as a vertical line, but it behaves well.
Perhaps there are some other settings or other changes that are relevant? Hmmm, I didn’t make them part of a UserControl instead of a Form. I’ll try that when I get a chance.