Export (0) Print
Expand All

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 system.windows.forms.dll)

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

Parameters

text

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

image

The Image to display on the ToolStripStatusLabel.

onClick

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

Community Additions

ADD
Show:
© 2014 Microsoft