Solved

Best way to move control into container

Posted on 2007-04-08
10
272 Views
Last Modified: 2013-11-26
Moving a control into a container control causes it to loose the events it was hooked to.  Sometimes the control is even renamed.  I'd like to take all of the controls I have on a form and put them into a container.  Is there a way to do that without loosing any of the events or properties set on these controls?
0
Comment
Question by:brettr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 5

Expert Comment

by:Yttribium
ID: 18872138
How are you moving them from container to container, also what version of Visual Studio are you using?
0
 

Author Comment

by:brettr
ID: 18872653
Drag and drop.  This should have to the VS.NET 2005 zone.
0
 
LVL 5

Expert Comment

by:Yttribium
ID: 18872657
Strange, I will have to test this, I never had this problem, all my events etc stayed put.
0
Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

 

Author Comment

by:brettr
ID: 18872732
ok, thanks.
0
 
LVL 5

Expert Comment

by:Yttribium
ID: 18872912
If you have a downloadable solution (zipped without the bin files) I might be able to see some "circumstantial" evidence of a problem.  If not, I can create a dummy project, tell me what type of container you're moving it to and from.  (like panel etc)
0
 
LVL 5

Accepted Solution

by:
Yttribium earned 500 total points
ID: 18873483
I just checked, I had no problems like you mentioned, unfortunately (fortunately?)...  Maybe you should describe exactly what you did, I did a lot of shuffling, dragging and dropping all my controls to different tab controls and panels, on a working application (with lots of nice controls and properties set with lots of events) and it worked just the way it did (albeit a bit ugly because of the moving items about into weird places for testing)...
0
 

Author Comment

by:brettr
ID: 18873612
I tried it as well. I got pretty involved with it and everything is fine.  I don't know what to say.  Guess I just wanted to make you work for these points.  I've have it happen before though.  Events for a control get wiped out.  Probably a very unique environment in which it will ever happen.  Thanks.
0
 
LVL 5

Expert Comment

by:Yttribium
ID: 18873625
Glad it's fixed at least :)  Nothing worse than "untraceable" problems...
0
 

Author Comment

by:brettr
ID: 18873697
Actually, this is a more of a problem in ASP.NET.  I took it for granted it would be a winform issue.  Before I got into  moving lots of controls, I wanted to see if anyone knew of a way to avoid loosing properties/events.  So, I should post this in the ASP.NET zone.
0
 
LVL 5

Expert Comment

by:Yttribium
ID: 18873702
Oh that's a different ball of cheese and lint all together, better post there.  If I get time I'll try investigate it, but at the moment I'm busy with a project - post the link here if you can please, I'll peek in hopefully.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question