Event firing twice in UserControl issue
- From: "Kevin S Gallagher" <kevin.s.gallagher@xxxxxxxxxxx>
- Date: Thu, 16 Oct 2008 11:59:49 -0700
I have a user control (from Microsoft which originally was simply a control
with no panel) with a panel then a custom ListControl. I want to be able to
trap SelectedValueChanged event of the ListControl. The code shown below
works but fires off the event twice, any thoughts?
Imports System.ComponentModel
Public Class RadioButtonListPanel
Public Event selectedvaluechanged(ByVal sender As Object, ByVal e As
System.EventArgs)
Private Sub radiobuttonlist1_selectedvaluechanged(ByVal sender As Object,
ByVal e As System.EventArgs) _
Handles RadioButtonList1.SelectedValueChanged
RaiseEvent selectedvaluechanged(sender, e)
End Sub
....
Code in form hosting the control
Private Sub RadioPanel1_SelectedValueChanged(ByVal sender As Object, ByVal e
As System.EventArgs) _
Handles RadioPanel1.selectedvaluechanged
If RadioPanel1.RadioButtonList1.SelectedIndex > -1 Then
Console.WriteLine(" --> {0}",
RadioPanel1.RadioButtonList1.SelectedValue.ToString)
End If
End Sub
.
- Follow-Ups:
- Re: Event firing twice in UserControl issue
- From: Kevin S Gallagher
- Re: Event firing twice in UserControl issue
- Prev by Date: What is the PictureBox downsampling for its bitmap?
- Next by Date: Re: What is the PictureBox downsampling for its bitmap?
- Previous by thread: What is the PictureBox downsampling for its bitmap?
- Next by thread: Re: Event firing twice in UserControl issue
- Index(es):