Adding panel by code appear behind other controls

NathanSav

Member
Joined
Feb 7, 2011
Messages
7
Programming Experience
10+
HI,

I have a panel that has various controls in, and drops down from a text box, similar to a combo, and this panel has controls in that are clicked. However, when the panel appears it appears behing 2 text boxes that are already on the form

This is my code, for the panel

With pnl
.Name = "cboDropDownArea"
.Top =
Me.Top + Me.Height
.Left =
Me.Left + ctlDropDownBox.Left
.Height = intPanelHeight
.Width = ctlDropDownBox.Width
.BorderStyle = BorderStyle.FixedSingle
.BackColor = System.Drawing.Color.Beige
.AutoScroll =
True
.BringToFront()
.Visible =
True
End With

Can anyone help.

Thanks.
 
Back
Top