This documentation is archived and is not being maintained.

StatusStrip.CreateDefaultItem Method

Note: This method is new in the .NET Framework version 2.0.

Creates a default ToolStripStatusLabel with the specified text, image, and event handler on a new StatusStrip instance.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in

protected internal override ToolStripItem CreateDefaultItem (
	string text,
	Image image,
	EventHandler onClick
protected ToolStripItem CreateDefaultItem (
	String text, 
	Image image, 
	EventHandler onClick
protected internal override function CreateDefaultItem (
	text : String, 
	image : Image, 
	onClick : EventHandler
) : ToolStripItem



The text to use for the ToolStripStatusLabel. If the text parameter is a hyphen (-), this method creates a ToolStripSeparator.


The Image to display on the ToolStripStatusLabel.


An event handler that raises the Click event when the ToolStripStatusLabel is clicked.

Return Value

A System.Windows.Forms.ToolStripStatusLabel(String,Image,EventHandler), or a ToolStripSeparator if the text parameter is a hyphen (-).

Use the CreateDefaultItem method to add a ToolStripStatusLabel with commonly used characteristics to a StatusStrip.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0