Multiple views -- single document


#1

I have multiple views using the same document. However, I cannot drag objects inside each view. Any help?
Regards


#2

That’s very odd. Two or more JGoViews that share the same JGoDocument ought to let the user see in all views what the user does in any one view. However, you can certainly disable some behavior, such as by setting JGoView’s DragEnabled or DropEnabled property to false, or by setting the JGoDocument’s Modifiable property to false.


#3

My first explanation is incomplete. The missing part is that I am actually adding jgo objects to the view not the actuall document owned by the view. Sorry for the confusion.
Thanks


#4

Oh–that’s a horse of a different color!
Indeed, by default, users cannot select view objects–they can only select document objects. If they can’t select something, they can’t manipulate it in the normal manners.
It’s possible to change that behavior. In fact the JGoOverview class does exactly that, both to make sure the user can’t select any document objects, and to make sure the user can only select the overview rectangle, which is a view object. JGoOverview does this by overriding pickDocObject to return the overview rectangle when appropriate, and null otherwise.
But I can’t say what would be best for your situation.


#5

Thanks Walter for the explanation. However, we took a different venue. We’re now using the jgo subgraph. JGoSubGraph is a very nice solution for creating a visual separation of jgo objects displayed by a jgo view. I’ll create a new topic under “Using JGoSubGraph class” with a question that I have, thanks.