<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxListBox</title>
</header>
<module>wxListBox</module>
<modulesummary>Functions for wxListBox class</modulesummary>
<description><p>A listbox is used to select one or more of a list of strings.
      </p><p>The strings are displayed in a scrolling box, with the selected string(s) marked in reverse video. A listbox can be single selection (if an item is selected, the previous selection is removed) or multiple selection (clicking an item toggles the item on or off independently of other selections).
      </p><p>List box elements are numbered from zero and while the maximal number of elements is unlimited, it is usually better to use a virtual control, not requiring to add all the items to it at once, such as <c>wxDataViewCtrl</c> (not implemented in wx) or <seeerl marker="wxListCtrl"><c>wxListCtrl</c></seeerl> with <c>wxLC_VIRTUAL</c> style, once more than a few hundreds items need to be displayed because this control is not optimized, neither from performance nor from user interface point of view, for large number of items.
      </p><p>Notice that the list box doesn't support control characters other than <c>TAB</c>.
      </p><p>Styles</p><p>This class supports the following styles:
      </p><p>See: <c>wxEditableListBox</c> (not implemented in wx), <seeerl marker="wxChoice"><c>wxChoice</c></seeerl>, <seeerl marker="wxComboBox"><c>wxComboBox</c></seeerl>, <seeerl marker="wxListCtrl"><c>wxListCtrl</c></seeerl>, <seeerl marker="wxCommandEvent"><c>wxCommandEvent</c></seeerl>
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxControlWithItems"><c>wxControlWithItems</c></seeerl> <seeerl marker="wxControl"><c>wxControl</c></seeerl> <seeerl marker="wxWindow"><c>wxWindow</c></seeerl> <seeerl marker="wxEvtHandler"><c>wxEvtHandler</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_list_box.html">wxListBox</url></p>
  </description><section><title>Events</title><p>Event types emitted from this class: <seeerl marker="wxCommandEvent"><c>command_listbox_selected</c></seeerl>, <seeerl marker="wxCommandEvent"><c>command_listbox_doubleclicked</c></seeerl></p></section>
<datatypes><datatype><name name="wxListBox"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>new/3</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
    <fsummary>Constructor, creating and showing a list box. </fsummary>
    <desc><p>Constructor, creating and showing a list box. 
      </p><p>See the other <seemfa marker="#new/3"><c>new/3</c></seemfa> constructor; the only difference is that this overload takes a <c>wxArrayString</c> (not implemented in wx) instead of a pointer to an array of <c>wxString</c> (not implemented in wx). 
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor, destroying the list box. </fsummary>
    <desc><p>Destructor, destroying the list box. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="6" clause_i="1" since=""/>
    <fsummary>See: <c>create/7</c></fsummary>
  </func>
  
  <func>
    <name name="create" arity="7" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="deselect" arity="2" clause_i="1" since=""/>
    <fsummary>Deselects an item in the list box. </fsummary>
    <desc><p>Deselects an item in the list box. 
      </p><p>Remark: This applies to multiple selection listboxes only. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSelections" arity="1" clause_i="1" since=""/>
    <fsummary>Fill an array of ints with the positions of the currently selected items. </fsummary>
    <desc><p>Fill an array of ints with the positions of the currently selected items. 
      </p><p>Return: The number of selections.
      </p><p>Remark: Use this with a multiple selection listbox.
      </p><p>See: <seemfa marker="wxControlWithItems#getSelection/1"><c>wxControlWithItems:getSelection/1</c></seemfa>, <seemfa marker="wxControlWithItems#getStringSelection/1"><c>wxControlWithItems:getStringSelection/1</c></seemfa>, <seemfa marker="wxControlWithItems#setSelection/2"><c>wxControlWithItems:setSelection/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="insertItems" arity="3" clause_i="1" since=""/>
    <fsummary>Insert the given number of strings before the specified position. </fsummary>
    <desc><p>Insert the given number of strings before the specified position. 
      </p></desc>
  </func>
  
  <func>
    <name name="isSelected" arity="2" clause_i="1" since=""/>
    <fsummary>Determines whether an item is selected. </fsummary>
    <desc><p>Determines whether an item is selected. 
      </p><p>Return: true if the given item is selected, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="set" arity="2" clause_i="1" since=""/>
    <fsummary>Replaces the current control contents with the given items. </fsummary>
    <desc><p>Replaces the current control contents with the given items. 
      </p><p>Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
      </p></desc>
  </func>
  
  <func>
    <name name="hitTest" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the item located at <c>point</c>, or <c>wxNOT_FOUND</c> if there is no item located at <c>point</c>. </fsummary>
    <desc><p>Returns the item located at <c>point</c>, or <c>wxNOT_FOUND</c> if there is no item located at <c>point</c>. 
      </p><p>It is currently implemented for wxMSW, wxMac and wxGTK2 ports.
      </p><p>Return: Item located at point, or wxNOT_FOUND if unimplemented or the item does not exist.
      </p><p>Since: 2.7.0 
      </p></desc>
  </func>
  
  <func>
    <name name="hitTest" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="setFirstItem" arity="2" clause_i="1" since=""/>
  
    <name name="setFirstItem" arity="2" clause_i="2" since=""/>
    <fsummary>Set the specified item to be the first visible item. </fsummary>
    <desc><p>Set the specified item to be the first visible item. 
      </p></desc>
  </func>
  </funcs>
</erlref>
