Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exposing Treeview Activex Events in Custom OCX 1

Status
Not open for further replies.

cariaco99

Programmer
Jan 31, 2004
17
0
0
US
Hi tehre,
I'm developing an activex that contains treeview OCX inside. I'm placing the Activex Control in an ASP page and I would like to access the NodeClick Event from my Page.
My CustomOCX is called HControl.ocx
and inside there is a Treeview called myTreeView
I tried:
<script language='VBScript'>
Sub MyTreeView_OnNodeClick(Node)
myValue = Node.Text
MsgBox myValue
End SUb
</script>
with no luck.
Can somebody help me?
Thanks
Rafael
 
Have you exposed the event from the treeview in your custom control...
somthing like

Code:
 public Event NodeClick(ByVal Node As Node)


Private Sub MyTreeview_NodeClick(ByVal Node As Node)
    RaiseEvent NodeClick(Node)
End Sub

AFAIK, you have to pass the event up through the OCX and expose it at that level (by ineffect handling the mytreeview event in the ocx by raising a new event to the parent form). You can do this either by manual coding or by using the ActiveX Control interface wizard.

Apart from that, posting the relevant OCX code may be better than the ASP code (which handles the event when raised)


Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Thanks!
I worked just like you wrote it.
Rafael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top