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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exposing Custom Control event (bubble)

Status
Not open for further replies.

rpeters74

Programmer
May 24, 2002
46
US
I thought this would be easier but I can not find a decent example.

I created a Custom Control, Tester, with a TextBox. When I use the control on a WebForm I want to be able to choose the Control from the top dropdownlist (in the IDE) and have the Textbox's TextChanged event available in the right dropdownlist.

My code
--
Private txt As TextBox

Protected Overrides Sub CreateChildControls()
txt = New TextBox
txt.ID = "txt"
AddHandler txt.TextChanged, AddressOf Me.OntxtTextChanged
Me.Controls.Add(txt)
End Sub

Public Overridable Sub OntxtTextChanged(ByVal sender As Object, ByVal e As EventArgs)
RaiseBubbleEvent(Me, e)
End Sub

--

I would expect the OntxtTextChanged event to show as an avaiable event for Tester in the WebForm.

Please advise

--
rp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top