This documentation is archived and is not being maintained.

ComponentDesigner.OnSetComponentDefaults Method

Sets the default properties for the component.

[Visual Basic]
Public Overridable Sub OnSetComponentDefaults()
[C#]
public virtual void OnSetComponentDefaults();
[C++]
public: virtual void OnSetComponentDefaults();
[JScript]
public function OnSetComponentDefaults();

Remarks

OnSetComponentDefaults is called when the designer is initialized. This allows the designer to provide default values for the base component.

The default implementation of this method sets the default property of the component to the name of the component if the default property is a string and the property is not already set. This method can be implemented in a derived class to customize the initialization of the component that this designer is designing.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ComponentDesigner Class | ComponentDesigner Members | System.ComponentModel.Design Namespace

Show: