System.Windows.Forms
2.0.0.0
System.Windows.Forms.ToolStripControlHost
System.Windows.Forms.Design.ToolStripItemDesignerAvailability(System.Windows.Forms.Design.ToolStripItemDesignerAvailability.ToolStrip | System.Windows.Forms.Design.ToolStripItemDesignerAvailability.MenuStrip | System.Windows.Forms.Design.ToolStripItemDesignerAvailability.ContextMenuStrip)
System.ComponentModel.DefaultProperty("Items")
is the optimized for hosting in a . A subset of the hosted control's properties and events are exposed at the level, but the underlying control is fully accessible through the property.
A displays an editing field combined with a , allowing the user to select from the list or to enter new text. By default, a displays an edit field with a hidden drop-down list. The property determines the style of combo box to display. You can enter a value that allows for a simple drop-down, where the list always displays, a drop-down list box, where the text portion is not editable and you must select an arrow to view the drop-down list box, or the default drop-down list box, where the text portion is editable and the user must press the arrow key to view the list. To always display a list that the user cannot edit, use a control.
To add objects to the list at run time, assign an array of object references with the method. The list then displays the default string value for each object. You can add individual objects with the method.
In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. The and methods enable you to add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string.
Use the property to get or set the current item in the drop-down list, and use the property to get or set a reference to the current item in the drop-down list.
Represents a that is properly rendered in a .
Constructor
To be added.
Initializes a new instance of the class.
2.0.0.0
Constructor
To be added.
Initializes a new instance of the class with the specified name.
The name of the .
2.0.0.0
Constructor
To be added.
Initializes a new instance of the class derived from a base control.
The base control.
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
Property
2.0.0.0
System.ComponentModel.Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Localizable(true)
System.ComponentModel.Browsable(true)
System.Windows.Forms.AutoCompleteStringCollection
To be added.
Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered.
The use of the property is optional, but you must set the property to in order to use .
You must use the and properties together.
Gets or sets the custom string collection to use when the property is set to .
Property
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.DefaultValue(System.Windows.Forms.AutoCompleteMode.None)
System.ComponentModel.Browsable(true)
System.Windows.Forms.AutoCompleteMode
To be added.
Use the property to get or set the behavior of automatic completion.
Gets or sets a value that indicates the text completion behavior of the .
Property
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.DefaultValue(System.Windows.Forms.AutoCompleteSource.None)
System.ComponentModel.Browsable(true)
System.Windows.Forms.AutoCompleteSource
To be added.
Use the property to get or set automatic completion strings.
Gets or sets the source of complete strings used for automatic completion.
Property
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Drawing.Image
To be added.
This property is not relevant to this class.
This property is not relevant to this class.
Property
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.ImageLayout
To be added.
This property is not relevant to this class.
This property is not relevant to this class.
Method
System.Void
This method prevents the control from painting until the method is called.
The preferred way to add items to the is to use the method through the property of the . This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list.
Maintains performance when items are added to the one at a time.
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Windows.Forms.ComboBox
To be added.
Use the property to get properties, methods, and events that have not been wrapped into .
Gets a in which the user can enter text, along with a list from which the user can select.
2.0.0.0
Property
2.0.0.0
System.Windows.Forms.Padding
To be added.
Override the property to configure a default size for your . This is more efficient than setting the size in the constructor.
Gets the default spacing, in pixels, between the and an adjacent item.
Property
System.Drawing.Size
To be added.
In order to maintain better performance, you should not set the of a in its constructor. The preferred method is to override the property.
Gets the default size of the .
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
This event is not relevant to this class.
This event is not relevant to this class.
2.0.0.0
Event
System.EventHandler
For more information about event-handler delegates, see Events and Delegates.
Occurs when the drop-down portion of a is shown.
2.0.0.0
Event
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the drop-down portion of the has closed.
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.DefaultValue(106)
System.ComponentModel.Browsable(true)
System.Int32
To be added.
Setting the property resets the property to false.
Gets or sets the height, in pixels, of the drop-down portion box of a .
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.DefaultValue(System.Windows.Forms.ComboBoxStyle.DropDown)
System.Windows.Forms.ComboBoxStyle
To be added.
The property controls the interface that is presented to the user. You can enter a value that allows for a simple drop-down list box, where the list always displays, a drop-down list box, where the text portion is not editable and you must select an arrow to view the drop-down, or the default drop-down list box, where the text portion is editable and the user must press the arrow key to view the list. To always display a list that the user cannot edit, use a control.
Gets or sets a value specifying the style of the .
2.0.0.0
Event
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the property has changed.
2.0.0.0
Property
System.Int32
To be added.
Use the property to get or set the width of the drop-down portion of a .
Gets or sets the width, in pixels, of the drop-down portion of a .
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Boolean
To be added.
To be added.
Gets or sets a value indicating whether the currently displays its drop-down portion.
2.0.0.0
Method
System.Void
The preferred way to add items to the is to use the method through the property of the . This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list.
Resumes painting the control after painting is suspended by the method.
2.0.0.0
Method
System.Int32
The search performed by this method is not case-sensitive. The parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text, and returning the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , use method to specify a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method.
Finds the first item in the that starts with the specified string.
The zero-based index of the first item found; returns -1 if no match is found.
The to search for.
2.0.0.0
Method
System.Int32
The search performed by this method is not case-sensitive. The parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text at the specified index, and returns the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , use this method to specify a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method.
Finds the first item after the given index which starts with the given string.
The zero-based index of the first item found; returns -1 if no match is found.
The to search for.
The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.
2.0.0.0
Method
System.Int32
The search performed by this method is not case-sensitive. The parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text at the specified index, and returns the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , use method to specify a starting index within the . If you want to search for a partial match instead of the exact word, use the method.
Finds the first item in the that exactly matches the specified string.
The zero-based index of the first item found; -1 if no match is found.
The to search for.
2.0.0.0
Method
System.Int32
The search performed by this method is not case-sensitive. The parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text at the specified index, and returns the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of exact text in the , use this method to specify a starting index within the . If you want to search for a partial match instead of the exact word, use the method.
Finds the first item after the specified index that exactly matches the specified string.
The zero-based index of the first item found; returns -1 if no match is found.
The to search for.
The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.
2.0.0.0
Property
2.0.0.0
System.ComponentModel.DefaultValue(System.Windows.Forms.FlatStyle.Popup)
System.ComponentModel.Localizable(true)
System.Windows.Forms.FlatStyle
To be added.
Use the property to get or set the display of the .
Gets or sets the appearance of the .
Method
System.Int32
To be added.
Returns the height, in pixels, of an item in the .
The height, in pixels, of the item at the specified index.
The index of the item to return the height of.
2.0.0.0
Method
System.Drawing.Size
To be added.
Retrieves the size of a rectangular area into which a control can be fitted.
An ordered pair of type representing the width and height of a rectangle.
The custom-sized area for a control.
2.0.0.0
Property
System.ComponentModel.DefaultValue(true)
System.ComponentModel.Localizable(true)
System.Boolean
To be added.
When this property is set to true, the control automatically resizes to ensure that an item is not partially displayed. If you want to maintain the original size of the based on the space requirements of your form, set this property to false. If the does not contain any items, this property has no effect.
Setting the property resets the property to false.
Gets or sets a value indicating whether the should resize to avoid showing partial items.
2.0.0.0
Property
System.ComponentModel.Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
System.ComponentModel.Localizable(true)
System.Windows.Forms.ComboBox+ObjectCollection
To be added.
To be added.
Gets a collection of the items contained in this .
2.0.0.0
Property
System.ComponentModel.DefaultValue(8)
System.ComponentModel.Localizable(true)
System.Int32
To be added.
Use the property to get or set the maximum number of items to show in the drop-down portion of the .
Gets or sets the maximum number of items to be shown in the drop-down portion of the .
2.0.0.0
Property
System.ComponentModel.DefaultValue(0)
System.ComponentModel.Localizable(true)
System.Int32
To be added.
To be added.
Gets or sets the maximum number of characters allowed in the editable portion of a combo box.
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
2.0.0.0
Method
System.Void
is raised only when the user changes the combo box selection. Do not use or to capture user changes, because those events are also raised when the selection changes programmatically. This event is also raised when you set .
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
2.0.0.0
Method
System.Void
Override the method to add or prevent the synchronizing of control events.
If you override and hook up events here, unhook them by using the method.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Subscribes events from the specified control.
The control from which to subscribe events.
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
2.0.0.0
Method
System.Void
Override the method to unsubscribe events subscribed in .
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Unsubscribes events from the specified control.
The control from which to unsubscribe events.
2.0.0.0
Method
System.Void
If you want to set the start position to the first character in the control's text, set the parameter to zero. You can use this method to select a substring of text, such as when searching through the text of the control and replacing information.
Selects a range of text in the editable portion of the .
The position of the first character in the current text selection within the text box.
The number of characters to select.
2.0.0.0
Method
System.Void
To be added.
Selects all the text in the editable portion of the .
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Int32
To be added.
This property indicates the zero-based index of the currently selected item in the combo box list. Setting a new index raises the event.
Note To deselect the currently selected item, set the to -1.
Gets or sets the index specifying the currently selected item.
2.0.0.0
Event
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the value of the property has changed.
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.ComponentModel.Bindable(true)
System.Object
To be added.
When you set the property to an object, the attempts to make that object the currently selected one in the list. If the object is found in the list, it is displayed in the edit portion of the and the property is set to the corresponding index. If the object does not exist in the list, the property is left at its current value.
Gets or sets currently selected item in the .
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.String
To be added.
You can assign text to this property to change the text currently selected in the combo box. If no text is currently selected in the combo box, this property returns a zero-length string.
Gets or sets the text that is selected in the editable portion of a .
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Int32
To be added.
You can use this property to determine whether any characters are currently selected in the combo box control before performing operations on the selected text. When the value of the property is set to a value that is larger than the number of characters within the text of the control, the value of the property is set to the entire length of text within the control minus the value of the property (if any value is specified for the property).
Gets or sets the number of characters selected in the editable portion of the .
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Int32
To be added.
If no text is selected in the control, this property indicates the insertion point for new text. If you set this property to a location beyond the length of the text in the control, the selection start position is placed after the last character. When text is selected in the text box control, changing this property can release the value of the property. If the remaining text in the control after the position indicated by the property is less than the value of the property, the value of the property is automatically decreased. The value of the property never causes an increase in the property.
Gets or sets the starting index of text selected in the .
2.0.0.0
Property
System.ComponentModel.DefaultValue(false)
System.Boolean
To be added.
This property specifies whether the sorts existing entries and add new entries to the appropriate sorted position in the list. You can use this property to automatically sort items in a . As items are added to a sorted , the items are moved to the appropriate location in the sorted list. When you set the property to false, new items are added to the end of the existing list. The sort is case-insensitive and in alphabetically ascending order.
Gets or sets a value indicating whether the items in the are sorted.
2.0.0.0
Event
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the text has changed.
2.0.0.0
Method
System.String
To be added.
Returns a string representation of the .
A string that represents the .
2.0.0.0