Doube-Click Event

I thought I could find my answer in the forum, but I cannot find exactly what I am looking for. So if it is here, please point me to the correct tread.

I am doing something VERY simple and I cannot capture the node on from a diagram. What I am doing is that I have created three node types. Let's say:
All of these are used to generate the document.
Now when I doulbe-click on any node, I want to capture the text value, as this is a key that I need in another process to run. But I cannot figure out the code to capture the text of the node that has been double-click.
I'm sure it is simple, but the samples and everything that I am looking at do things via a context menu or something else. So I just do not not see how to capture this from the sender object or the event object. I am using VB.
So all I need to do is create the double-click event, which I have, then capture the clicked node and pull it's text value. But I have different node types.
Any suggestion are appreciated. Thanks for you time and help.

assume: node is your captured node

if typeof node is Basicnode then
myText = ctype(node, Basicnode).text
elseif typeof node is RectangleNode then
myText = ctype(node, RectangleNode).text
end if

Thanks for the response. That is the second part of what I need… thanks.

But I am not sure how to capture the actual node that was selected on the double-click.
In the event I have the sender object. So I've tried to cast it as a node and cannot figure that step out. I think that is what I am doing wrong.
Do you know how to capture the node from the double-click event?

GoView has an ObjectDoubleClicked event.

From the DataSetDemo sample:

Private Sub goView1_ObjectDoubleClicked(ByVal sender As Object, ByVal e As Northwoods.Go.GoObjectEventArgs) Handles goView1.ObjectDoubleClicked

Dim n As PersonNode = Nothing

If (TypeOf e.GoObject.ParentNode Is PersonNode) Then n = CType(e.GoObject.ParentNode, PersonNode)

If (n Is Nothing) Then Return


actually, VB-wise, this code is a little cleaner:

Dim n As PersonNode = TryCast(e.GoObject.ParentNode, PersonNode)

Thanks for letting me know… that looks exactly like what I need.

I did not see that in the samples. I did a search for ObjectDoubleClicked accross all of the samples and it did not find anything. I probably did the search wrong or misspelled it. So thanks for finding that for me.
Best regards,

No problem. There’s a ton of samples, it’s easy to miss things.