# UserInterfaceDropDown class

Namespace: [Rhino.UI](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.ui.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class UserInterfaceDropDown : UserInterfaceControl
```

A drop-down list: a box that shows the item chosen, and the list of items that opens under it when the box is clicked. Choosing an item in the list, with the mouse or the keyboard, changes SelectedIndex and raises SelectedIndexChanged.

The open list is drawn over every other user interface object, and while it is open it has the mouse to itself: a click on an item chooses it, and a click anywhere else in the view closes the list and goes no further. The mouse wheel scrolls a list longer than MaximumVisibleItems.

Once the drop-down has keyboard focus, Up and Down, Home and End move through the items, Space or Enter opens the list and chooses from it, Escape closes it and a letter goes to the next item that starts with it.

The box shows the selected item, or PlaceholderText when nothing is selected. Text is not used.

## Constructors

- [UserInterfaceDropDown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/ctor.md): (2 overloads)

## Properties

- [IsListOpen](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/islistopen.md): Is the list open? Setting it opens the list in the view the drop-down was last drawn in, or closes it without changing the selection. Only one list is open at a time, and a drop-down that has not been added to a document has none to open.
- [ItemCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/itemcount.md)
- [Items](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/items.md): The items in the list, in the order they are shown
- [MaximumVisibleItems](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/maximumvisibleitems.md): Most items the open list shows at once; a longer list scrolls. The default is 10. The list also shrinks to what fits in the view.
- [PlaceholderText](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/placeholdertext.md): Text drawn, dimmed, in the box when nothing is selected
- [SelectedIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/selectedindex.md): Index of the item chosen, -1 when nothing is. Setting it does not raise SelectedIndexChanged; that is only for a choice the user made. An index out of range selects nothing.
- [SelectedItem](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/selecteditem.md): Text of the item chosen, null when nothing is

## Methods

- [AddItem](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/additem.md): Adds an item at the end of the list
- [ClearItems](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/clearitems.md): Empties the list, which leaves nothing selected
- [InsertItem](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/insertitem.md): Puts an item in at index, moving the items from there on along. The same item stays selected.
- [OnSelectedIndexChanged](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/onselectedindexchanged.md): Called after the user chose a different item, from the list or with the keys. The default implementation raises the SelectedIndexChanged event.
- [RemoveItemAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/removeitemat.md): Takes the item at index out of the list. The same item stays selected; taking out the selected item leaves nothing selected.
- [SetItem](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/setitem.md): Changes the text of the item at index

## Events

- [SelectedIndexChanged](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown/selectedindexchanged.md): Raised after the user chose a different item, from the list or with the keys

## Inherited Members

- From [UserInterfaceControl](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol.md): [BackgroundColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/backgroundcolor.md), [HorizontalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/horizontalalignment.md), [Location](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/location.md), [Size](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/size.md), [Text](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/text.md), [TextColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textcolor.md), [TextHeight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textheight.md), [TextHorizontalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/texthorizontalalignment.md), [TextVerticalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textverticalalignment.md), [TrackingPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/trackingpoint.md), [VerticalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/verticalalignment.md), [ComputedRectangle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/computedrectangle.md), [SetSvg](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/setsvg.md)
- From [UserInterfaceObjectBase](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase.md): [BoundToActiveView](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/boundtoactiveview.md), [HasKeyboardFocus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/haskeyboardfocus.md), [Tooltip](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/tooltip.md), [Visible](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/visible.md), [IsMouseOver](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ismouseover.md), [IsRegistered](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/isregistered.md), [OnDraw](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ondraw.md), [OnMouseClick](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseclick.md), [OnMouseDoubleClick](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousedoubleclick.md), [OnMouseDown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousedown.md), [OnMouseEnter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseenter.md), [OnMouseLeave](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseleave.md), [OnMouseMove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousemove.md), [OnMouseUp](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseup.md), [OnRunCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onruncommand.md), [RegisterForAllDocuments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/registerforalldocuments.md), [RunCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/runcommand.md), [Unregister](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/unregister.md)
