How to position object in the center

It looks like a simple thing, but I can't figure it out.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I created some GoObjects and add them to the document by

Document.Add(). Now I want to scroll the view to show one of these objects. I can't use GoObject.View.ScrollRectangleToVisible, because the View property of these objects is null. How can I do that?

Also, how can position scroll the veiw so my object appears in the center?

Thanks

Presumably you know which GoView that you want to scroll.
If so, and you have a particular GoObject “obj” that you want to make visible, you can just call GoView.ScrollRectangleToVisible(obj.Bounds).