PC Review


Reply
Thread Tools Rate Thread

container usercontrol

 
 
sergio
Guest
Posts: n/a
 
      9th Jul 2004
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



 
Reply With Quote
 
 
 
 
sergio
Guest
Posts: n/a
 
      9th Jul 2004
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

"sergio" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set Image File Property in UserControl from Container =?Utf-8?B?TmVhbCBNaWxsZXI=?= Microsoft Dot NET Framework Forms 0 5th Jan 2005 11:29 PM
How to capture UserControl mouse events in it's container Stefan Microsoft Dot NET Framework Forms 4 21st Jun 2004 07:43 PM
Make Container UserControl force controls to be added to a child container control Codemonkey Microsoft Dot NET Framework Forms 2 21st Nov 2003 08:22 PM
Usercontrol as a container and anchored constituents controls karlodb Microsoft Dot NET 0 24th Oct 2003 03:46 PM
Usercontrol as a container and docked constituents karlodb Microsoft VB .NET 0 24th Oct 2003 01:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:12 PM.