Click here to Skip to main content
15,888,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I may just be being dense. I always use the same exact properties or a small variation of those on every control that I add of a certain type. Is there a way that you can make the control have those properties set your way by default? For instance if I add a text box control I always raise the font property to 10. It was be nice to just add the control and it be there.
I realize I could do this with copy and paste but it would be easier in my opinion to be able to just drag the controls from the toolbox.
Posted

1 solution

One way to do this is to inherit your own controls from the standard controls and in the derived class handle the defaults etc.

If this is WinForms the following article could be useful: http://msdn.microsoft.com/en-us/library/ms171834.aspx[^]
 
Share this answer
 
Comments
programmervb.netc++ 1-Apr-11 13:02pm    
That makes sense I was just thinking that maybe there was something in options like this.
The reason I thought this is because of the options screen where you can tell the IDE which type of controls to default to based on datatype.
Thanks for your response btw.
Wendelius 1-Apr-11 14:04pm    
You're welcome. Some development tools have such features (such as so called 4th generation tools) but in VS at least I'm not aware of such defaults.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900