Center GoView


I am currently adding a GoView into a WinForms Panel. Is there a way to center the GoView inside de Panel?


GoView is just a WinForms control, it should respond appropriately to whatever WinForms stuff you wrap around it.

Or are you asking if you can get the diagram to show up centered inside the GoView?

Yes, I have the diagram to be centered inside de GoView.
Is it possible?

Sure. see

This solution is not what I expect. It is adding scroll bars and then centering.
I want the draw to start centered without adding scroll.
Is it possible?

Any solution to this?

Sorry, should have answered here too… I was thinking the answer to your other question was going to solve this one too.

doc.Bounds = doc.ComputeBounds()

doc.ComputeBounds() is not centering the GoView.
Is there anything else I could try?

Many thanks.

no… but it should get rid of the scrollbars.

Hi Jake,

The method doc.ComputeBounds() is getting rid of the scrollbars. That's working perfectly now. I was now trying to center the GoView. I assume that's not possible considering your last answer.


Yes, see the link I gave you a couple of days ago…

be sure to set GoView.SheetStyle, that’s important.

Do you have an example I could download showing how to center de GoView?
I used the code shown in the link but it didn’t work. Perhaps I am doing something wrong…

Probably easier if you post what you’ve done, I’m pretty sure that code in the other thread works, it has been there a long time.