Hi
i had created dynamic tool strip button user control.But the run time
buttons are not visible.i dont know where i am doing mistake.please help me
to solve this problem.
This is code
Public Class ToolStripButtonMenu
Public Sub CreateButtonMenu(ByVal aParam As ArrayList)
ToolStripInterface.CreateButtonMenu
If Not aParam Is Nothing And aParam.Count > 0 Then
Me.ToolStripControl.SuspendLayout()
Me.SuspendLayout()
Dim tb(aParam.Count - 1) As ToolStripButton
For i = 0 To aParam.Count
tb(i) = New ToolStripButton
tb(i).BackColor = System.Drawing.SystemColors.ActiveCaption
tb(i).AutoSize = True
tb(i).Name = aParam.Item(i).ToString
tb(i).Text = aParam.Item(i).ToString
AddHandler tb(i).Click, AddressOf ToolStripButton_Click
Next
Me.ToolStripControl.Items.AddRange(tb)
Me.ToolStripControl.ResumeLayout(False)
Me.ToolStripControl.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End If
End Sub
Private Sub ToolStripButton_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs)
MsgBox("From userControl")
End Sub
End Class
Thanks in advance
Nakkeeran.k