Windows forms combobox items add


















Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Please rate your experience Yes No. Download Microsoft Edge More info.

Contents Exit focus mode. Combo Box. Items Property Reference Is this page helpful? Please rate your experience Yes No. Any additional feedback? Namespace: System. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services.

Privacy policy. Thank you. Microsoft makes no warranties, express or implied, with respect to the information provided here. Adds an item to the list of items for a ComboBox. The item parameter was null. This method adds an item to the combo box. With the BeginUpdate and EndUpdate methods, you can add a large number of items to the ComboBox without the control being repainted each time an item is added to the list.

The FindString and FindStringExact methods enable you to search for an item in the list that contains a specific search string. You can use these properties to manage the currently selected item in the list, the Text property to specify the string displayed in the editing field, the SelectedIndex property to get or set the current item, and the SelectedItem property to get or set a reference to the object.

If you have a ListBox , ComboBox , or CheckedListBox on a base Windows Forms page and want to modify the string collections of those controls in a derived form, the string collections of those controls in the base form must be empty. If the string collections are not empty, they become read-only when you derive another form.

Initializes a new instance of the ComboBox class. Gets the AccessibleObject assigned to the control. Gets or sets the default action description of the control for use by accessibility client applications.

Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent. Gets or sets an option that controls how automatic completion works for the ComboBox. Gets or sets the background image layout as defined in the ImageLayout enumeration. Gets or sets the BindingContext for the control. Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

Gets or sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control. Gets a value indicating whether the ImeMode property can be set to an active value, to enable IME support.

Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.

Gets the IContainer that contains the Component. Gets a value indicating whether the control, or one of its child controls, currently has the input focus. Gets or sets the ContextMenuStrip associated with this control.

Gets the CurrencyManager associated with this control. Gets or sets the data source for this ComboBox. Gets or sets the data source for this ListControl. Gets the length and height, in pixels, that is specified as the default maximum size of a control. Gets the length and height, in pixels, that is specified as the default minimum size of a control.

Gets a value that indicates whether the Component is currently in design mode. Gets or sets the property to display for this ListControl. Gets a value indicating whether the base Control class is in the process of disposing.

Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent. Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker. Gets or sets a value indicating whether your code or the operating system will handle drawing of elements in the list. Gets or sets the height in pixels of the drop-down portion of the ComboBox.

Gets the list of event handlers that are attached to this Component. Gets or sets the appearance of the ComboBox. Gets a value indicating whether the ComboBox has focus. Gets or sets the IFormatProvider that provides custom formatting behavior.

Gets or sets a value indicating whether formatting is applied to the DisplayMember property of the ListControl. Gets or sets a value indicating whether the control should resize to avoid showing partial items. Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on. Indicates if one of the Ancestors of this control is sited and that site in DesignMode.

This property is read-only. Gets an object representing the collection of the items contained in this ComboBox. Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area. Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.

Gets or sets the maximum number of items to be shown in the drop-down portion of the ComboBox. Gets or sets the size that is the upper limit that the GetPreferredSize Size method can specify. Gets or sets the size that is the upper limit that GetPreferredSize Size can specify. Gets or sets the number of characters a user can type into the ComboBox. Gets or sets the size that is the lower limit that the GetPreferredSize Size method can specify.

Gets or sets the size that is the lower limit that GetPreferredSize Size can specify. Gets the preferred height of the ComboBox.

Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area. Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts. Gets or sets currently selected item in the ComboBox. Gets or sets the text that is selected in the editable portion of a ComboBox. Gets or sets the value of the member property specified by the ValueMember property. Gets a value indicating whether the user interface is in the appropriate state to show or hide keyboard accelerators.

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. Gets or sets the distance, in pixels, between the top edge of the control and the top edge of its container's client area. Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in. Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls.

Gets or sets the path of the property to use as the actual value for the items in the ListControl. Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control. Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on. Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on.

Maintains performance when items are added to the ComboBox one at a time. Forces the creation of the visible control, including the creation of the handle and any visible child controls. Creates the Graphics for the control. Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. Releases all resources used by the Component. Releases the unmanaged resources used by the ComboBox and optionally releases the managed resources.

Retrieves the return value of the asynchronous operation represented by the IAsyncResult passed. Resumes painting the ComboBox control after painting is suspended by the BeginUpdate method.

Retrieves the current value of the ListControl item, if it is a property of an object, given the item. Returns the current value of the ListControl item, if it is a property of an object given the item and the property name.

Returns the index of the first item in the ComboBox that starts with the specified string. Returns the index of the first item in the ComboBox beyond the specified index that contains the specified string.

The search is not case sensitive. Retrieves the specified AccessibleObject. Retrieves a value indicating how a control will behave when its AutoSize property is enabled. Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type. Returns the next ContainerControl up the control's chain of parent controls.

Returns the height of an item in the ComboBox. Retrieves the current lifetime service object that controls the lifetime policy for this instance. Returns an object that represents a service provided by the Component or by its Container. Gets the Type of the current instance.

Invalidates a specific region of the control and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control. Invalidates the specified region of the control adds it to the control's update region, which is the area that will be repainted at the next paint operation , and causes a paint message to be sent to the control.

Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments. Raises the GotFocus event for the specified control. Raises the LostFocus event for the specified control. Raises the Click event for the specified control. Raises the Paint event for the specified control.

Raises the PaintBackground event for the specified control. Determines whether the specified key is a regular input key or a special key that requires preprocessing. Transforms a size from logical to device units by scaling it for the current DPI and rounding down to the nearest integer value for width and height. Creates a shallow copy of the current Object.

Creates a shallow copy of the current MarshalByRefObject object. Raises the Invalidated event with a specified region of the control to invalidate. Raises the AutoSizeChanged event. Raises the BackColorChanged event. Raises the BackgroundImageChanged event. Raises the BackgroundImageLayoutChanged event. Raises the BindingContextChanged event. Raises the CausesValidationChanged event.

Raises the ChangeUICues event. Raises the Click event. Raises the ClientSizeChanged event. Raises the ContextMenuChanged event. Raises the ContextMenuStripChanged event. Raises the ControlAdded event. Raises the ControlRemoved event. Raises the CreateControl method. Raises the CursorChanged event. Raises the DataSourceChanged event. Raises the DisplayMemberChanged event. Raises the DockChanged event. Raises the DoubleClick event. Raises the DpiChangedAfterParent event. Raises the DpiChangedBeforeParent event.

Raises the DragDrop event. Raises the DragEnter event. Raises the DragLeave event. Raises the DragOver event. Raises the DrawItem event. Raises the DropDown event. Raises the DropDownClosed event.

Raises the DropDownStyleChanged event. Raises the EnabledChanged event. Raises the Enter event. Raises the FontChanged event. Raises the ForeColorChanged event. Raises the Format event. Raises the FormatInfoChanged event. Raises the FormatStringChanged event. Raises the FormattingEnabledChanged event. Raises the GiveFeedback event. Raises the GotFocus event. Raises the HandleCreated event.

Raises the HandleDestroyed event. Raises the HelpRequested event. Raises the ImeModeChanged event. Raises the Invalidated event. Raises the KeyDown event. Raises the KeyPress event.



0コメント

  • 1000 / 1000