I’m having an issue getting a Event Definition to on a WebContainer when adding them at Run Time.
If I add an Event Definition called TestDef to a WebContainer and then drag that Container onto a WebPage and do right click Add Event Handler my TestDef Event Definition is available and works fine.
If however I want to add the WebContainer to the WebPage as run time AddHandler doesn’t show the Event Definition TestDef.
Greg, It’s nothing special just made up a simple test project
ContainerControlX = New ContainerControl1
ContainerControlX.EmbedWithin WebPage1, 300, 0, ContainerControlX.Width, ContainerControlX.Height
' CAN'T DO THIS TESTDEF is missing
'AddHandler ContainerControlX
Testdef is not missing, it just doesn’t autocomplete, you have to type it fully. The same thing happens when you subclass a timer and user addhandler to handle the action event.
Hi,
I am encountering the same problem without being able to resolve it.
I have the event definition ed_followup in my Container_LabelSpec
Dim cb As WebContainer = New Container_LabelSpec
cb.EmbedWithin(Container_SpecList1,0,p_ytop4,480,35)
AddHandler cb.ed_followup, AddressOf Page_appointment.m_SpecSelect
Public Property cb as Container_LabelSpec
I set the event definition in Container_LabelSpec;
Event ed_followup()
The runtime code:
cb = New Container_LabelSpec
cb.EmbedWithin(Container_SpecList1,0,p_ytop4,480,35)
AddHandler cb.ed_followup, AddressOf Page_appointment.m_SymptomSelect
and I got this Error message:
[quote] Type mismatch error. Expected delegate Delegate( Container_LabelSpec.Container_LabelSpec ), but got delegate Delegate( )
AddHandler cb.ed_followup, AddressOf Page_appointment.m_SymptomSelect
[/quote]