-
Controls
How do I combine 2 controls into one and still maintain the design time features of the individual controls. Basically I am trying to put a label and text box into a pannel and making a custom control/control. Once I drag and drop the new control on my form I still should be able to see the design time features of textbox,label etc like properties/methods/events etc at design time. Supposed on a form that I dropped my control say I do not want a textbox for some reason the user should be able to delete it by selecting the textbox and hitting the delete button as we do in visual studio designer/Editor 2003.
I would appreciate if some one has a sample code or point me in the right direction.
-
Hi,
I think you have not received any response because your question is not clear.
First of all, are you saying you want to create a custom control which other programmers will use, or just that you want the user to be able to delete a control in run time?
-
Project menu -----> Add User Control .
-
Hi Ganga,
The e_mail you sent clarifies your requirements completely. I am posting it below:
"I am not sure if I want a custom control or not. But what I want is some kind of generic code or componet or User Control or custom control where I will place a label and texbox in a pannel where I handle the default look and behaviour or font etc.
And then once I have the generic code or control I would like to place it in my Form and still should be able to access all events/methods/properties at the design time on the destination form.
My plan is to create a generic code or component so that the developers would drop it on the form with out worrying about the look and behaviour of each control."
Yes you can do this. I am spending the day away from my office, so others will probably respond more quickly (hence my posting your message). Bye for now. I will see what responses you have had by tomorrow.