NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ComboBox Class

Displays an editing field and a list, allowing the user to select from the list or to enter new text. Displays only the editing field until the user explicitly displays the list.

Object
   MarshalByRefObject
      MarshalByRefComponent
         Control
            RichControl
               FormatControl
                  ListControl
                     ComboBox

[Visual Basic]
Public Class ComboBox
   Inherits ListControl
[C#]
public class ComboBox : ListControl
[C++]
public __gc class ComboBox : public ListControl
[JScript]
public class ComboBox extends ListControl

Remarks

The Style property determines whether the user can enter a new value, and whether the list portion is always displayed. To always display a list that the user may not edit, use a ListBox control.

To add objects to the list at run time, assign an array of object references to the Items property. The list then displays the default string value for each object. You can also assign an array of string literals.

Use these properties to manage the currently selected item in the list: The Text property specifies the string displayed in the editing field. The SelectedIndex property specifies the index. The SelectedItem property is a reference to the object.

The System.WinForms.ComboBox.GetItemText method returns the display string for the specified item even if it is not currently selected.

Requirements

Namespace: System.WinForms

Assembly: System.WinForms.dll

See Also

ComboBox Members | System.WinForms Namespace