# Class: ComboBox

### LuxModule: gui

A ComboBox combines multiple strings that can be selected in a small rectangle. The current state is very simple but is capable of mimic the basics of a normal ComboBox.

## Hierarchy

    o-+ Component
      o-+ Container
        o-+ ComboBox

## Methods:

### Method overview:

- addItem
- clearItems
- getSelected
- new
- onSelected
- removeItem
- select

new (table class, int x,y,w,h,[Skin2D skin])
  returns: (ComboBox)
  creates a combobox at the given coordinates with the given skin.
addItem (ComboBox, string caption, [string cmd,[icon, iconskinselection] ])
  returns: (function add)
  adds an item to the combobox. It returns a function that can be called again:

       mycombobox:addItem("Hello")("World") -- adds hello and world

clearItems (ComboBox)
  returns: ()
  removes all items from the list
getSelected (ComboBox)
  returns: ([int index, string caption, string command])
  returns information on the currently selected item.
onSelected (ComboBox,int index, string caption, string command)
  returns: ()
  this function can be overloaded without calling this function. It is called each time the user selects an item - which does not have to be different from the previously selected item.
removeItem (ComboBox, int id)
  returns: ()
  Removes an item from the list. The id refers to the index of the item in the list.
select (ComboBox, string/int something, [boolean iscommand])
  returns: (int selected)
  selects the specified item by its name, number or commandstring

## Inherited Methods:

### From Container

add, components, delete, deleteChilds, getComponentAt, getRootContainer, invalidate, isChildOf, isRootContainer, mouseEvent, moveZ, new, onDisplayChange, onVisibilityChange, removeChilds, removeComponent, toString, validate

### From Component

acceptSkinBounds, addKeyListener, addMouseListener, addTooltipListener, clipinsets, colors, contains, createVisibles, delete, deleteVisibles, fadeTo, focus, focuscolors, getBottom, getBounds, getClipRect, getFocusComponentAt, getFocusElement, getFocusIndex, getHeight, getLocation, getMinSize, getMouseLock, getParent, getRight, getSize, getSkin, getTooltip, getWidth, getX, getY, hasFocus, hideVisibles, index, invalidate, isClipped, isDisplayedFlag, isFocusable, isMouseLocker, isVisible, isVisibleFlag, keyEvent, keylisteners, local2world, lockMouse, mouseClicked, mouseEntered, mouseEvent, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheeled, mouselisteners, moveToRect, new, newFocusOrder, onDestroy, onDisplayChange, onGainedFocus, onLostFocus, onVisibilityChange, positionUpdate, remove, removeKeyListener, removeMouseListener, removeTooltipListener, setBounds, setClip, setColor, setDisabled, setDisplayable, setFont, setLocation, setSize, setSkin, setTooltip, setVisibility, showTooltipInformation, showVisibles, skinnames.defaultskin, skinnames.focusedskin, skinnames.hoveredskin, skinnames.pressedskin, think, toString, transferFocus, transferFocusOnArrows, transferFocusOnTab, unlockMouse, updateSkin, validate, validateFocus, white, world2local, zorderoffset