container usercontrol

S

sergio

Hi,

I've created a usercontrol that acts like a container. Its a panel with color borders. The problem is that when I drop a control into this usercontrol the control added doesn't appear, then I need to select it in the properties window and "bring to front" in order to appear.

What I need is that is acts like a normal panel and all added controls appears as they are dropped into the panel.

Some idea?

Sérgio R. Pires
 
S

sergio

Ok, I found the solution.

Private Sub Box_ControlAdded(ByVal sender As Object, ByVal e As System.Windows.Forms.ControlEventArgs) Handles MyBase.ControlAdded

e.Control.BringToFront()

End Sub



Thanks anyway.

Sérgio R. Pires

Hi,

I've created a usercontrol that acts like a container. Its a panel with color borders. The problem is that when I drop a control into this usercontrol the control added doesn't appear, then I need to select it in the properties window and "bring to front" in order to appear.

What I need is that is acts like a normal panel and all added controls appears as they are dropped into the panel.

Some idea?

Sérgio R. Pires
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top