Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Custom control--resetting designtime appearance
 

Custom control--resetting designtime appearance

I have created a custom compound control to use in my application (contains a picturebox, radio button and a textbox).  All properties affecting the appearance of this control are set at runtime and are hidden from the property grid at designtime.  Maybe I am missing the obvious, but how do I get the custom control's appearance to remain static in designtime (regardless of changes made to its various appearance property settings at runtime)?

Thanks in advance for any help!

Chales
MigrationUser 1  Wednesday, March 19, 2003 5:48 PM
To do this you'll have to use a technique we call "shadowing".  If I understand you correctly, this is the same as what happens with a Control's Enabled and Visible properties -- changes to these at design time don't actually hide or disable the control in the designer.

For an explantion of shadowing, go to the Articles section of this website, the "Designers" heading, and look for the article on Creating Custom Designers (by me).


MigrationUser 1  Tuesday, March 25, 2003 6:27 PM
Thanks for taking the time to point me in the right direction Shawn.  Your article was very helpful!

Charles
MigrationUser 1  Wednesday, March 26, 2003 5:43 AM

You can use google to search for other answers

Custom Search

More Threads

• ReOrdering the column in datagridview
• pls reply it is urgent! telephone digit limit in textbox, i cant use masked textbox
• label with select text and copy functionality similar like textbox
• table integrity
• Custom Menu Designer
• set different widths for cells of Tablelayoutpanel
• How to allow resizing in one direction only?
• Change backcolor and forecolor when hovering menu items
• the datagrid columns backcolor did not take effect c# 2005
• Winforms designer throws System.NotSupportedException