<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Responding to changes</title> <link rel="stylesheet" type="text/css" href="style.css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="index.html" title="Programming with gtkmm 3"> <link rel="up" href="chapter-combobox.html" title="Chapter 10. Combo Boxes"> <link rel="prev" href="sec-combobox-get.html" title="The chosen item"> <link rel="next" href="combobox-example-full.html" title="Full Example"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr><th colspan="3" align="center">Responding to changes</th></tr> <tr> <td width="20%" align="left"> <a accesskey="p" href="sec-combobox-get.html"><img src="icons/prev.png" alt="Prev"></a> </td> <th width="60%" align="center">Chapter 10. Combo Boxes</th> <td width="20%" align="right"> <a accesskey="n" href="combobox-example-full.html"><img src="icons/next.png" alt="Next"></a> </td> </tr> </table> <hr> </div> <div class="sect1"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="sec-combobox-changes"></a>Responding to changes</h2></div></div></div> <p> You might need to react to every change of selection in the ComboBox, for instance to update other widgets. To do so, you should handle the <code class="literal">changed</code> signal. For instance: </p> <pre class="programlisting">m_combo.signal_changed().connect( sigc::mem_fun(*this, &ExampleWindow::on_combo_changed) );</pre> </div> <div class="navfooter"> <hr> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"> <a accesskey="p" href="sec-combobox-get.html"><img src="icons/prev.png" alt="Prev"></a> </td> <td width="20%" align="center"><a accesskey="u" href="chapter-combobox.html"><img src="icons/up.png" alt="Up"></a></td> <td width="40%" align="right"> <a accesskey="n" href="combobox-example-full.html"><img src="icons/next.png" alt="Next"></a> </td> </tr> <tr> <td width="40%" align="left" valign="top">The chosen item </td> <td width="20%" align="center"><a accesskey="h" href="index.html"><img src="icons/home.png" alt="Home"></a></td> <td width="40%" align="right" valign="top"> Full Example</td> </tr> </table> </div> </body> </html>