<?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>wxComboBox</title>
</header>
<module>wxComboBox</module>
<modulesummary>Functions for wxComboBox class</modulesummary>
<description><p>A combobox is like a combination of an edit control and a listbox.
      </p><p>It can be displayed as static list with editable or read-only text field; or a drop-down list with text field; or a drop-down list without a text field depending on the platform and presence of wxCB_READONLY style.
      </p><p>A combobox permits a single selection only. Combobox items are numbered from zero.
      </p><p>If you need a customized combobox, have a look at <c>wxComboCtrl</c> (not implemented in wx), <c>wxOwnerDrawnComboBox</c> (not implemented in wx), <c>wxComboPopup</c> (not implemented in wx) and the ready-to-use <c>wxBitmapComboBox</c> (not implemented in wx).
      </p><p>Please refer to <c>wxTextEntry</c> (not implemented in wx) documentation for the description of methods operating with the text entry part of the combobox and to <c>wxItemContainer</c> (not implemented in wx) for the methods operating with the list of strings. Notice that at least under MSW <seeerl marker="wxComboBox"><c>wxComboBox</c></seeerl> doesn't behave correctly if it contains strings differing in case only so portable programs should avoid adding such strings to this control.
      </p><p>Styles</p><p>This class supports the following styles:
      </p><p>See: <seeerl marker="wxListBox"><c>wxListBox</c></seeerl>, <seeerl marker="wxTextCtrl"><c>wxTextCtrl</c></seeerl>, <seeerl marker="wxChoice"><c>wxChoice</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_combo_box.html">wxComboBox</url></p>
  </description><section><title>Events</title><p>Event types emitted from this class: <seeerl marker="wxCommandEvent"><c>command_combobox_selected</c></seeerl>, <seeerl marker="wxCommandEvent"><c>command_text_updated</c></seeerl>, <seeerl marker="wxCommandEvent"><c>command_text_enter</c></seeerl>, <seeerl marker="wxCommandEvent"><c>combobox_dropdown</c></seeerl>, <seeerl marker="wxCommandEvent"><c>combobox_closeup</c></seeerl></p></section>
<datatypes><datatype><name name="wxComboBox"/></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 combobox. </fsummary>
    <desc><p>Constructor, creating and showing a combobox. 
      </p><p>See: <seemfa marker="#create/8"><c>create/8</c></seemfa>, <c>wxValidator</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor, destroying the combobox. </fsummary>
    <desc><p>Destructor, destroying the combobox. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="7" clause_i="1" since=""/>
    <fsummary>See: <c>create/8</c></fsummary>
  </func>
  
  <func>
    <name name="create" arity="8" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="canCopy" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the selection can be copied to the clipboard. </fsummary>
    <desc><p>Returns true if the selection can be copied to the clipboard. 
      </p></desc>
  </func>
  
  <func>
    <name name="canCut" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the selection can be cut to the clipboard. </fsummary>
    <desc><p>Returns true if the selection can be cut to the clipboard. 
      </p></desc>
  </func>
  
  <func>
    <name name="canPaste" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the contents of the clipboard can be pasted into the text control. </fsummary>
    <desc><p>Returns true if the contents of the clipboard can be pasted into the text control. 
      </p><p>On some platforms (Motif, GTK) this is an approximation and returns true if the control is editable, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="canRedo" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if there is a redo facility available and the last operation can be redone. </fsummary>
    <desc><p>Returns true if there is a redo facility available and the last operation can be redone. 
      </p></desc>
  </func>
  
  <func>
    <name name="canUndo" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if there is an undo facility available and the last operation can be undone. </fsummary>
    <desc><p>Returns true if there is an undo facility available and the last operation can be undone. 
      </p></desc>
  </func>
  
  <func>
    <name name="copy" arity="1" clause_i="1" since=""/>
    <fsummary>Copies the selected text to the clipboard. </fsummary>
    <desc><p>Copies the selected text to the clipboard. 
      </p></desc>
  </func>
  
  <func>
    <name name="cut" arity="1" clause_i="1" since=""/>
    <fsummary>Copies the selected text to the clipboard and removes it from the control. </fsummary>
    <desc><p>Copies the selected text to the clipboard and removes it from the control. 
      </p></desc>
  </func>
  
  <func>
    <name name="getInsertionPoint" arity="1" clause_i="1" since=""/>
    <fsummary>Same as <c>wxTextCtrl:getInsertionPoint/1</c>. </fsummary>
    <desc><p>Same as <seemfa marker="wxTextCtrl#getInsertionPoint/1"><c>wxTextCtrl:getInsertionPoint/1</c></seemfa>. 
      </p><p>Note: Under wxMSW, this function always returns 0 if the combobox doesn't have the focus. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLastPosition" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control. </fsummary>
    <desc><p>Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control. 
      </p></desc>
  </func>
  
  <func>
    <name name="getValue" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the contents of the control. </fsummary>
    <desc><p>Gets the contents of the control. 
      </p><p>Notice that for a multiline text control, the lines will be separated by (Unix-style) <c>\n</c> characters, even under Windows where they are separated by a <c>\r\n</c> sequence in the native control. 
      </p></desc>
  </func>
  
  <func>
    <name name="paste" arity="1" clause_i="1" since=""/>
    <fsummary>Pastes text from the clipboard to the text item. </fsummary>
    <desc><p>Pastes text from the clipboard to the text item. 
      </p></desc>
  </func>
  
  <func>
    <name name="redo" arity="1" clause_i="1" since=""/>
    <fsummary>If there is a redo facility and the last operation can be redone, redoes the last operation. </fsummary>
    <desc><p>If there is a redo facility and the last operation can be redone, redoes the last operation. 
      </p><p>Does nothing if there is no redo facility. 
      </p></desc>
  </func>
  
  <func>
    <name name="replace" arity="4" clause_i="1" since=""/>
    <fsummary>Replaces the text starting at the first position up to (but not including) the character at the last position with the given text. </fsummary>
    <desc><p>Replaces the text starting at the first position up to (but not including) the character at the last position with the given text. 
      </p><p>This function puts the current insertion point position at <c>to</c> as a side effect.
      </p></desc>
  </func>
  
  <func>
    <name name="remove" arity="3" clause_i="1" since=""/>
    <fsummary>Removes the text starting at the first given position up to (but not including) the character at the last position. </fsummary>
    <desc><p>Removes the text starting at the first given position up to (but not including) the character at the last position. 
      </p><p>This function puts the current insertion point position at <c>to</c> as a side effect.
      </p></desc>
  </func>
  
  <func>
    <name name="setInsertionPoint" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the insertion point at the given position. </fsummary>
    <desc><p>Sets the insertion point at the given position. 
      </p></desc>
  </func>
  
  <func>
    <name name="setInsertionPointEnd" arity="1" clause_i="1" since=""/>
    <fsummary>Sets the insertion point at the end of the text control. </fsummary>
    <desc><p>Sets the insertion point at the end of the text control. 
      </p><p>This is equivalent to calling <seemfa marker="#setInsertionPoint/2"><c>setInsertionPoint/2</c></seemfa> with <seemfa marker="#getLastPosition/1"><c>getLastPosition/1</c></seemfa> argument. 
      </p></desc>
  </func>
  
  <func>
    <name name="setSelection" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the selection to the given item <c>n</c> or removes the selection entirely if <c>n</c> == <c>wxNOT_FOUND</c>. </fsummary>
    <desc><p>Sets the selection to the given item <c>n</c> or removes the selection entirely if <c>n</c> == <c>wxNOT_FOUND</c>. 
      </p><p>Note that this does not cause any command events to be emitted nor does it deselect any other items in the controls which support multiple selections.
      </p><p>See: <seemfa marker="wxControlWithItems#setString/3"><c>wxControlWithItems:setString/3</c></seemfa>, <seemfa marker="wxControlWithItems#setStringSelection/2"><c>wxControlWithItems:setStringSelection/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setSelection" arity="3" clause_i="1" since=""/>
    <fsummary>Same as <c>wxTextCtrl:setSelection/3</c>. </fsummary>
    <desc><p>Same as <seemfa marker="wxTextCtrl#setSelection/3"><c>wxTextCtrl:setSelection/3</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="setValue" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the text for the combobox text field. </fsummary>
    <desc><p>Sets the text for the combobox text field. 
      </p><p>For normal, editable comboboxes with a text entry field calling this method will generate a <c>wxEVT_TEXT</c> event, consistently with <seemfa marker="wxTextCtrl#setValue/2"><c>wxTextCtrl:setValue/2</c></seemfa> behaviour, use <seemfa marker="wxTextCtrl#changeValue/2"><c>wxTextCtrl:changeValue/2</c></seemfa> if this is undesirable.
      </p><p>For controls with <c>wxCB_READONLY</c> style the method behaves somewhat differently: the string must be in the combobox choices list (the check for this is case-insensitive) and <c>wxEVT_TEXT</c> is <c>not</c> generated in this case.
      </p></desc>
  </func>
  
  <func>
    <name name="undo" arity="1" clause_i="1" since=""/>
    <fsummary>If there is an undo facility and the last operation can be undone, undoes the last operation. </fsummary>
    <desc><p>If there is an undo facility and the last operation can be undone, undoes the last operation. 
      </p><p>Does nothing if there is no undo facility. 
      </p></desc>
  </func>
  </funcs>
</erlref>
