ToolStripItem
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| Exam 70-526 Preparation Guide: Create and configure menus. |
Contents |
A ToolStripItem is an element such as a button, combo box, text box, or label that can be contained in a ToolStrip control or a ToolStripDropDown control.
The ToolStripItem class is an abstract class that manages events and layout for all of the elements that a ToolStrip or ToolStripDropDown can contain.
ToolStripItem controls must be contained in a ToolStrip, MenuStrip, StatusStrip, or ContextMenuStrip and cannot be added directly to a form.
[edit]
Inheritance hierarchy
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.ToolStripItem (abstract)
System.Windows.Forms.ToolStripButton
System.Windows.Forms.ToolStripControlHost (abstract)
System.Windows.Forms.ToolStripComboBox
System.Windows.Forms.ToolStripProgressBar
System.Windows.Forms.ToolStripTextBox
System.Windows.Forms.ToolStripDropDownItem (abstract)
System.Windows.Forms.ToolStripDropDownButton
System.Windows.Forms.ToolStripOverflowButton
System.Windows.Forms.ToolStripMenuItem
System.Windows.Forms.ToolStripSplitButton
System.Windows.Forms.ToolStripColorButton
System.Windows.Forms.ToolStripLabel
System.Windows.Forms.ToolStripStatusLabel
System.Windows.Forms.ToolStripSeparator
[edit]
Useful properties
-
Image- Gets or sets the image that is displayed on aToolStripItem.
-
-
ImageAlign- Gets or sets the alignment of the image on aToolStripItem.
-
-
ImageIndex- Gets or sets the index value of the image that is displayed on the item.
-
-
ImageKey- Gets or sets the key accessor for the image in theImageListthat is displayed on aToolStripItem.
-
-
ImageScaling- Indicaties whether an image on aToolStripItemis automatically resized to fit in a container.
-
-
ImageTransparentColor- Gets or sets the color to treat as transparent in aToolStripItemimage.
-
-
Text- Gets or sets the text that is to be displayed on the item.
-
-
TextAlign- Gets or sets the alignment of the text on a ToolStripLabel.
-
-
TextDirection- Gets the orientation of text used on aToolStripItem.
-
-
TextImageRelation- Gets or sets the position ofToolStripItemtext and image relative to each other.
-
-
ToolTipText- Gets or sets the text that appears as aToolTipfor a control.
-
[edit]
Useful methods
-
GetCurrentParent- Retrieves the ToolStrip that is the container of the currentToolStripItem.
-
[edit]
Other resources
Tool, Menu, and Status Strips—The ToolStripItem
[edit]
MSDN resources
- ToolStripButton - Provides a typical pushbutton which supports both text and images.
- ToolStripControlHost - A control that acts as a host for customized implementations or any other Windows Form controls.
- ToolStripComboBox - A
ComboBox.
- ToolStripProgressBar - A specialized progress bar implementation for use within a
StatusStripcontrol.
- ToolStripTextBox - A normal textbox which can be used to enter text.
- ToolStripDropDownItem - An abstract base class.
- ToolStripDropDownButton - This control provides a button which, if clicked, displays a ToolStripDropDown control.
- ToolStripMenuItem - A special menu control built specifically for use with the MenuStrip and ContextMenuStrip controls.
- ToolStripSplitButton - A combination of normal button and a DropDownButton. With has an arrow down button for a DropDownList of buttons.
- ToolStripLabel - Used to display normal text, hyperlinks, and images.
- ToolStripSeparator - A separator which visually separate groups of elements.
- ToolStripContainer - A control that act a container for ToolStripControls.
|
© 2007-2008 Mike Kitchen

