Morning,
I am trying to add a click event for the controls that i add into my Panel dynamically. The control i add is a custom class that i have created called 'Slide'.
Here is the code where i build the Slide class that will be added to the panel:
Dim thisControl As New Slide()
With thisControl
.Dock = System.Windows.Forms.DockStyle.Left
.Thumbnail.Image = ThisSlide
.Thumbnail.BackColor = Color.Transparent
.Caption.Text = "Slide" & radSlides.SelectedIndex
.Ordinal = pnlScheduledSlides.Controls.Count.ToString
.Duration = Conversion.Int(20)
.Content = pContent
End With
Then I add 'thisControl' to the panel:
pnlScheduledSlides.Controls.Add(thisControl)
I am wanted to be able to click on a Slide inside the panel so that i can add some functionality to be able to add/remove the slide.