Tiling GoView.Selection

Hi,
I’ve discovered something strange. When I horizontally tile two GoDocuments within my form and select a GoObject in the bottom GoDocument, the GoView does not recognize that the GoObject has been selected. It only recognizes it if a GoObject in the top GoDocument is selected.
Is there any way to fix this?
Thanks!
Joy

I assume you mean GoViews, not GoDocuments, since GoViews are WinForms Controls that can be in Forms, whereas GoDocuments are just collections of objects in memory.
Are you selecting the object programmatically? Which document are you searching in when selecting? Or are the two views sharing a single document?
Regardless, remember that selection state is per-view, not per document.

You are right, it’s GoViews not GoDocuments, I mixed it in my mind. I think I have tracked the problem down to this function that I copied from the ProtoApp Sample application:
Public Function GetCurrentGraphView() As GraphView
If Not Me.ActiveMdiChild Is Nothing AndAlso TypeOf Me.ActiveMdiChild.ActiveControl Is GraphView Then
Return CType(Me.ActiveMdiChild.ActiveControl, GraphView)
Else
Return Nothing
End If
End Function
As far as I can tell this function can not find the active GoView when there are more than one open at the same time. It just grabs the first GoView that was created that is open. But this is probably a Windows issue not a GoDiagram issue correct? In any case, do you have any suggestions on how I could resolve this?
Thanks!
Joy

Ah, you’re talking about MDI child windows, not just GoViews.
Well, it seems to work in the ProtoApp sample application, since functionality such as the properties window (showing a ComboBox and a PropertyGrid) updates correctly depending on which MDI child window is active.
I’m sorry I don’t have any guesses as to what might be wrong in your application. One of the reasons we provide ProtoApp, even though a lot of the functionality doesn’t (strictly) demonstrate features of GoDiagram, is that implementing an MDI application isn’t quite so simple in Windows Forms.