BackgroundContextClicked Event does not fire

I am using the Evaluation version of GoDiagram (GoWin 2.6.2.2) for .NET 1.1 (VB.NET) using Visual Studio 2003. I am trying to get a very basic example to work. I have the following code. <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Private Sub GoView1_BackgroundContextClicked(ByVal sender As Object, ByVal e As Northwoods.Go.GoInputEventArgs) Handles GoView1.BackgroundContextClicked

Dim pGoBasicNode As New Northwoods.Go.GoBasicNode

pGoBasicNode.Location = e.DocPoint

Me.GoView1.Document.Add(pGoBasicNode)

End Sub

The BackgroundContextClicked Event does not seem to fire. Nothing happens using the code above. So I tried a different Event. The following code works fine.

Private Sub GoView1_BackgroundDoubleClicked(ByVal sender As Object, ByVal e As Northwoods.Go.GoInputEventArgs) Handles GoView1.BackgroundDoubleClicked

Dim pGoBasicNode As New Northwoods.Go.GoBasicNode

pGoBasicNode.Location = e.DocPoint

Me.GoView1.Document.Add(pGoBasicNode)

End Sub

Why does the BackgroundContextClicked Event not fire?

Thanks,

-eric

I just tried this, and both worked just as I think you would expect.

I started VS2003, created a VB WinForm app, dropped into the Form a GoView from the Toolbox, and added your event handler code into the Form1.vb file.
So I cannot explain why this doesn't work for you.
The only oddity is that you say you are using version 2.6.2.2, which is actually a version compiled for .NET 2.0, not .NET 1.1. You should be using 2.6.2.1. However, I do not see how you could have added a .NET 2.0 control into a Toolbox folder in Visual Studio 2003. Did you just add it by hand-coding it in the Form?

Oh I think you are right the version is 2.6.2.1, which was a type-o. I did what you described. I added the GoView control to a Form and in the Code View I used the two combo boxes at the top to stub out the two events.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

And it still doesn’t work?

Here's what I did: http://www.nwoods.com/forum/uploads/WindowsApplication3.zip

Walter, BTW thanks for helping out. I took your ZIP file, extracted it, opened it in VS2003 and clicked run. Nothing happens when I left click to try and add a point. I even put a break point on the Event line and nothing. I can drag a rectangle to select. <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I just noticed that it does work when I right click but nothing happens when I left click.

That’s right – I used your code for the GoView.BackgroundContextClicked event handler, i.e. when the user right clicks.

If you want the node to be created when the user left clicks, you can handle the GoView.BackgroundSingleClicked event instead.

Ok well now that makes sense. I feel stupid. :-)