DocExtent

So the Go documentation says: “Gets the extent of the view in its document, both position and size.” for the DocExtent member on the GoView class.

What exactly does this mean?

Right now, I am having issues with the centering and position of nodes inside of a view. In fact, to get them to do it right, I am having to subtract 15 and 8 pixels from origin to get things close to center and can not figure out why. I am using the GoView.Bounds value to compute things.

Is DocExtent a more proper rectangle to use?

Did you see Walter’s last note in this thread?

http://www.nwoods.com/forum/forum_posts.asp?TID=2494

Yes I did, but I am seeing other issues with how things get laid out, and like I said, the offsets I am having to use are troublesome and unexplainable.

Ok maybe answering this will help… What are/can be/is the differences between:

view.Bounds
view.DocExtent
view.Position (relative to the points in Bounds and DocExtent)?

Bounds and Position are Control properties, in Control coordinates.
(Hmmm, I don’t remember a Control.Position property. But Control.Left, Control.Top, Control.Width, Control.Height are all in control coordinates.)

GoView.DocExtent and other GoView.Doc… properties all involve document coordinates, describing how much and where the GoView displays of its GoDocument.