<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Wt: Wt::Ext::ComboBox Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt  <span id="projectnumber">3.2.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a> </li> <li class="navelem"><a class="el" href="namespaceWt_1_1Ext.html">Ext</a> </li> <li class="navelem"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html">ComboBox</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::Ext::ComboBox Class Reference<div class="ingroups"><a class="el" href="group__ext.html">Ext widgets (Wt::Ext, deprecated)</a> | <a class="el" href="group__modelview.html">Model/view system</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::Ext::ComboBox" --><!-- doxytag: inherits="Wt::Ext::LineEdit" --> <p>A widget that provides a drop-down combo-box control. <a href="classWt_1_1Ext_1_1ComboBox.html#details">More...</a></p> <p><code>#include <Wt/Ext/ComboBox></code></p> <div class="dynheader"> Inheritance diagram for Wt::Ext::ComboBox:</div> <div class="dyncontent"> <div class="center"><img src="classWt_1_1Ext_1_1ComboBox__inherit__graph.png" border="0" usemap="#Wt_1_1Ext_1_1ComboBox_inherit__map" alt="Inheritance graph"/></div> <map name="Wt_1_1Ext_1_1ComboBox_inherit__map" id="Wt_1_1Ext_1_1ComboBox_inherit__map"> <area shape="rect" href="classWt_1_1Ext_1_1LineEdit.html" title="A line edit." alt="" coords="15,453,135,480"/><area shape="rect" href="classWt_1_1Ext_1_1FormField.html" title="An abstract base class for form fields." alt="" coords="9,379,140,405"/><area shape="rect" href="classWt_1_1Ext_1_1Component.html" title="An abstract base class for widgets that can be visually disabled." alt="" coords="5,304,144,331"/><area shape="rect" href="classWt_1_1Ext_1_1Widget.html" title="An abstract base class for all Ext widgets." alt="" coords="17,229,132,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="11,155,139,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="25,80,124,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="27,5,123,32"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classWt_1_1Ext_1_1ComboBox-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8183ecd2ee82149a57121dc6cce94538"></a><!-- doxytag: member="Wt::Ext::ComboBox::ComboBox" ref="a8183ecd2ee82149a57121dc6cce94538" args="(WContainerWidget *parent=0)" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a8183ecd2ee82149a57121dc6cce94538">ComboBox</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create an empty combo-box with optional <em>parent</em>. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a282ddb37ddc6d8606e2385a742a60452">addItem</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &text)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add an option item. <a href="#a282ddb37ddc6d8606e2385a742a60452"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a388ebac95d30babbd8cc494837932587"></a><!-- doxytag: member="Wt::Ext::ComboBox::count" ref="a388ebac95d30babbd8cc494837932587" args="() const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a388ebac95d30babbd8cc494837932587">count</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of items. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#aabc76822524dbe503909472ea2aac8db">currentIndex</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the currently selected item. <a href="#aabc76822524dbe503909472ea2aac8db"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a6e9f541c754551c1ecbcdeb9337ecfb3">insertItem</a> (int index, const <a class="el" href="classWt_1_1WString.html">WString</a> &text)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Insert an option item at the specified position. <a href="#a6e9f541c754551c1ecbcdeb9337ecfb3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#ab17f27bcbd7d93db4f0147699bbdb5a0">removeItem</a> (int index)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove the option item at the specified position. <a href="#ab17f27bcbd7d93db4f0147699bbdb5a0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a1c9f4f4be0dd147954e8b21931511cdd">setCurrentIndex</a> (int index)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Change the current selection. <a href="#a1c9f4f4be0dd147954e8b21931511cdd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a808bf7caa59a88c172124fe73090a964">setItemText</a> (int index, const <a class="el" href="classWt_1_1WString.html">WString</a> &text)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Change the text for a specified option. <a href="#a808bf7caa59a88c172124fe73090a964"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#aa0a811e97424b7980f4da77c3711c72a">currentText</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the text of the currently selected item. <a href="#aa0a811e97424b7980f4da77c3711c72a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a59faa0b8b2cb3a2b25a4b47eb82ecb8b">itemText</a> (int index) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the text of a particular item. <a href="#a59faa0b8b2cb3a2b25a4b47eb82ecb8b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a54d18b5dde4bd46b830c2b2ecd6d0765">setModel</a> (<a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> *model)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the model to be used for the items. <a href="#a54d18b5dde4bd46b830c2b2ecd6d0765"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a46e2c9ac50d405d5e4ad8215ce5bb885">setModelColumn</a> (int index)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the column in the model to be used for the items. <a href="#a46e2c9ac50d405d5e4ad8215ce5bb885"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a0c150137b5ad059ba66ee8f0b85b3585">setEditable</a> (bool how)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set if the combo-box is editable. <a href="#a0c150137b5ad059ba66ee8f0b85b3585"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a8310599aaa5efc0ae08cf9323f321a7f">setQueryDelay</a> (int milliSeconds)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure the delay to filter the list matching the current input. <a href="#a8310599aaa5efc0ae08cf9323f321a7f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a181b1185f0ae607c61c62e900cbe479c">setMinQueryLength</a> (int numChars)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure the minimum number of characters to be entered before filtering the drop-down list. <a href="#a181b1185f0ae607c61c62e900cbe479c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a7e723bcbf36890f51805d8c373198ded">setPageSize</a> (int pageSize)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure a page size to show matching values one page at a time. <a href="#a7e723bcbf36890f51805d8c373198ded"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a8cbea60f93ad91387200a3e49e33eaf0">setDataLocation</a> (<a class="el" href="group__ext.html#ga5bc908c6e6aa90646cca1276d68cb2b2">DataLocation</a> dataLocation)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure the location of the data for the combo-box. <a href="#a8cbea60f93ad91387200a3e49e33eaf0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a48b20b2d00b523a28e2c1bd0a1a9bfcd">refresh</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Refresh the widget. <a href="#a48b20b2d00b523a28e2c1bd0a1a9bfcd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af91ec32bf3c21c1ccb34d0cd4ad5f8bf"></a><!-- doxytag: member="Wt::Ext::ComboBox::clear" ref="af91ec32bf3c21c1ccb34d0cd4ad5f8bf" args="()" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#af91ec32bf3c21c1ccb34d0cd4ad5f8bf">clear</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Clear all items. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9cde6eed9970ddf8523ecb35c717c1b5"></a><!-- doxytag: member="Wt::Ext::ComboBox::activated" ref="a9cde6eed9970ddf8523ecb35c717c1b5" args="()" --> <a class="el" href="classWt_1_1JSignal.html">JSignal</a>< int > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a9cde6eed9970ddf8523ecb35c717c1b5">activated</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when the selection changed. <br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A widget that provides a drop-down combo-box control. </p> <p>A combo-box provides the user with a choice of options to chose from. Use <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a282ddb37ddc6d8606e2385a742a60452" title="Add an option item.">addItem(const WString&)</a> or <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a6e9f541c754551c1ecbcdeb9337ecfb3" title="Insert an option item at the specified position.">insertItem(int, const WString&)</a> to populate the combo-box. All the content can be cleared through <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#af91ec32bf3c21c1ccb34d0cd4ad5f8bf" title="Clear all items.">clear()</a>.</p> <p>To act on a new selection, either connect a slot to the <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a9cde6eed9970ddf8523ecb35c717c1b5" title="Signal emitted when the selection changed.">activated()</a> signal.</p> <p>At all times, the current selection index is available through <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#aabc76822524dbe503909472ea2aac8db" title="Get the currently selected item.">currentIndex()</a> or the text using <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#aa0a811e97424b7980f4da77c3711c72a" title="Get the text of the currently selected item.">currentText()</a>.</p> <p>By default the ComboBox uses a <a class="el" href="classWt_1_1WStringListModel.html" title="An model that manages a list of strings.">WStringListModel</a> to store the items. This may be changed by specifying a custom model with <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a54d18b5dde4bd46b830c2b2ecd6d0765" title="Set the model to be used for the items.">setModel()</a>.</p> <p>When the combobox is configured to be <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a0c150137b5ad059ba66ee8f0b85b3585">editable</a>, the user may enter a value which is not available in the list of values. In that case, <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#aa0a811e97424b7980f4da77c3711c72a" title="Get the text of the currently selected item.">currentText()</a> will hold this value, while <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#aabc76822524dbe503909472ea2aac8db" title="Get the currently selected item.">currentIndex()</a> == -1 indicates that the value was not in the list.</p> <p>By default, all the data is downloaded to the client. This may be changed using <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a8cbea60f93ad91387200a3e49e33eaf0" title="Configure the location of the data for the combo-box.">setDataLocation(DataLocation)</a> to keep the data at hte server, and download data on-demand. This is useful if you have a very large list of options.</p> <p>The API is a superset of the <a class="el" href="classWt_1_1WComboBox.html" title="A widget that provides a drop-down combo-box control.">WComboBox</a> API.</p> <div class="image"> <img src="ExtComboBox-1.png" alt="ExtComboBox-1.png"/> <div class="caption"> ComboBox with expanded drop-down list.</div></div> </div><hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a282ddb37ddc6d8606e2385a742a60452"></a><!-- doxytag: member="Wt::Ext::ComboBox::addItem" ref="a282ddb37ddc6d8606e2385a742a60452" args="(const WString &text)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::addItem </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>text</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Add an option item. </p> <p>Equivalent to <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a6e9f541c754551c1ecbcdeb9337ecfb3">insertItem </a> (<a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a388ebac95d30babbd8cc494837932587" title="Get the number of items.">count()</a>, <em>text</em>). </p> </div> </div> <a class="anchor" id="aabc76822524dbe503909472ea2aac8db"></a><!-- doxytag: member="Wt::Ext::ComboBox::currentIndex" ref="aabc76822524dbe503909472ea2aac8db" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::Ext::ComboBox::currentIndex </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get the currently selected item. </p> <p>If no item is currently selected, the method returns -1. <br/> If the combo-box is <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a0c150137b5ad059ba66ee8f0b85b3585">editable</a> and the entered text does not match an existing item, then this method also returns -1. Otherwise the index is returned of the first item that matches the value of <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#aa0a811e97424b7980f4da77c3711c72a" title="Get the text of the currently selected item.">currentText()</a>. </p> </div> </div> <a class="anchor" id="aa0a811e97424b7980f4da77c3711c72a"></a><!-- doxytag: member="Wt::Ext::ComboBox::currentText" ref="aa0a811e97424b7980f4da77c3711c72a" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classWt_1_1WString.html">WString</a> Wt::Ext::ComboBox::currentText </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get the text of the currently selected item. </p> <p>This retrieves the current text entered by the user. When the combo-box is <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a0c150137b5ad059ba66ee8f0b85b3585">editable</a>, this may be text that does not correspond to any of the items. </p> </div> </div> <a class="anchor" id="a6e9f541c754551c1ecbcdeb9337ecfb3"></a><!-- doxytag: member="Wt::Ext::ComboBox::insertItem" ref="a6e9f541c754551c1ecbcdeb9337ecfb3" args="(int index, const WString &text)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::insertItem </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>index</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>text</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Insert an option item at the specified position. </p> <p>The option item is inserted at position <em>index</em>. </p> </div> </div> <a class="anchor" id="a59faa0b8b2cb3a2b25a4b47eb82ecb8b"></a><!-- doxytag: member="Wt::Ext::ComboBox::itemText" ref="a59faa0b8b2cb3a2b25a4b47eb82ecb8b" args="(int index) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classWt_1_1WString.html">WString</a> Wt::Ext::ComboBox::itemText </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>index</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get the text of a particular item. </p> <p>Use this method to get the text for the item at position <em>index</em>. </p> </div> </div> <a class="anchor" id="a48b20b2d00b523a28e2c1bd0a1a9bfcd"></a><!-- doxytag: member="Wt::Ext::ComboBox::refresh" ref="a48b20b2d00b523a28e2c1bd0a1a9bfcd" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::refresh </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Refresh the widget. </p> <p>The refresh method is invoked when the locale is changed using <a class="el" href="classWt_1_1WApplication.html#a5c9cc1350019d69f154a2b44cdaf2596" title="Changes the locale.">WApplication::setLocale()</a> or when the user hit the refresh button.</p> <p>The widget must actualize its contents in response. </p> <p>Reimplemented from <a class="el" href="classWt_1_1Ext_1_1FormField.html#a0ac56f725de8a68fd7931b9319286485">Wt::Ext::FormField</a>.</p> </div> </div> <a class="anchor" id="ab17f27bcbd7d93db4f0147699bbdb5a0"></a><!-- doxytag: member="Wt::Ext::ComboBox::removeItem" ref="ab17f27bcbd7d93db4f0147699bbdb5a0" args="(int index)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::removeItem </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>index</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Remove the option item at the specified position. </p> <p>The option item at position <em>index</em> will be removed. </p> </div> </div> <a class="anchor" id="a1c9f4f4be0dd147954e8b21931511cdd"></a><!-- doxytag: member="Wt::Ext::ComboBox::setCurrentIndex" ref="a1c9f4f4be0dd147954e8b21931511cdd" args="(int index)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setCurrentIndex </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>index</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Change the current selection. </p> <p>Specify a value of -1 for <em>index</em> to clear the selection. </p> </div> </div> <a class="anchor" id="a8cbea60f93ad91387200a3e49e33eaf0"></a><!-- doxytag: member="Wt::Ext::ComboBox::setDataLocation" ref="a8cbea60f93ad91387200a3e49e33eaf0" args="(DataLocation dataLocation)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setDataLocation </td> <td>(</td> <td class="paramtype"><a class="el" href="group__ext.html#ga5bc908c6e6aa90646cca1276d68cb2b2">DataLocation</a> </td> <td class="paramname"><em>dataLocation</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure the location of the data for the combo-box. </p> <p>When a ClientSide data location is specified, all data for the combo-box is downloaded when the combo-box is created. Using a ServerSide data location, data is downloaded to the client only when needed.</p> <p>The defualt value is ClientSide. </p> </div> </div> <a class="anchor" id="a0c150137b5ad059ba66ee8f0b85b3585"></a><!-- doxytag: member="Wt::Ext::ComboBox::setEditable" ref="a0c150137b5ad059ba66ee8f0b85b3585" args="(bool how)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setEditable </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"><em>how</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Set if the combo-box is editable. </p> <p>An editable combo-box allows the user to specify a value that is not part of the list of values.</p> <p>The default is false.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#aa0a811e97424b7980f4da77c3711c72a" title="Get the text of the currently selected item.">currentText()</a> </dd></dl> </div> </div> <a class="anchor" id="a808bf7caa59a88c172124fe73090a964"></a><!-- doxytag: member="Wt::Ext::ComboBox::setItemText" ref="a808bf7caa59a88c172124fe73090a964" args="(int index, const WString &text)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setItemText </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>index</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>text</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Change the text for a specified option. </p> <p>Use this method to change the text for the item at position <em>index</em>. </p> </div> </div> <a class="anchor" id="a181b1185f0ae607c61c62e900cbe479c"></a><!-- doxytag: member="Wt::Ext::ComboBox::setMinQueryLength" ref="a181b1185f0ae607c61c62e900cbe479c" args="(int numChars)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setMinQueryLength </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>numChars</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure the minimum number of characters to be entered before filtering the drop-down list. </p> <p>Values in the drop-down list will only be filtered when the entered text contains more that <em>numChars</em> characters.</p> <p>The default value is 4.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a8310599aaa5efc0ae08cf9323f321a7f" title="Configure the delay to filter the list matching the current input.">setQueryDelay(int)</a> </dd></dl> </div> </div> <a class="anchor" id="a54d18b5dde4bd46b830c2b2ecd6d0765"></a><!-- doxytag: member="Wt::Ext::ComboBox::setModel" ref="a54d18b5dde4bd46b830c2b2ecd6d0765" args="(WAbstractItemModel *model)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setModel </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> * </td> <td class="paramname"><em>model</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the model to be used for the items. </p> <p>The <em>model</em> may not be 0, and ownership of the model is not transferred.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a46e2c9ac50d405d5e4ad8215ce5bb885" title="Set the column in the model to be used for the items.">setModelColumn(int)</a> </dd></dl> </div> </div> <a class="anchor" id="a46e2c9ac50d405d5e4ad8215ce5bb885"></a><!-- doxytag: member="Wt::Ext::ComboBox::setModelColumn" ref="a46e2c9ac50d405d5e4ad8215ce5bb885" args="(int index)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setModelColumn </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>index</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the column in the model to be used for the items. </p> <p>The column <em>index</em> in the model will be used to retrieve data.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a54d18b5dde4bd46b830c2b2ecd6d0765" title="Set the model to be used for the items.">setModel()</a> </dd></dl> </div> </div> <a class="anchor" id="a7e723bcbf36890f51805d8c373198ded"></a><!-- doxytag: member="Wt::Ext::ComboBox::setPageSize" ref="a7e723bcbf36890f51805d8c373198ded" args="(int pageSize)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setPageSize </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>pageSize</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure a page size to show matching values one page at a time. </p> <p>At most <em>pageSize</em> matches will be shown at the same time in the combo-box.</p> <p>The default value is 0 (no paging). </p> </div> </div> <a class="anchor" id="a8310599aaa5efc0ae08cf9323f321a7f"></a><!-- doxytag: member="Wt::Ext::ComboBox::setQueryDelay" ref="a8310599aaa5efc0ae08cf9323f321a7f" args="(int milliSeconds)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::ComboBox::setQueryDelay </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>milliSeconds</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure the delay to filter the list matching the current input. </p> <p>After the a delay of <em>milliSeconds</em> milli seconds, the list items are filtered to match the currently entered text and the drop-down list is updated. It is recommended to specify a non-zero delay when using a Remote <a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a8cbea60f93ad91387200a3e49e33eaf0">data location</a>.</p> <p>The default is 0.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1ComboBox.html#a181b1185f0ae607c61c62e900cbe479c" title="Configure the minimum number of characters to be entered before filtering the drop-down list...">setMinQueryLength(int)</a> </dd></dl> </div> </div> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>