<div>Hello everyone.</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am developing a GUI application on maemo, in which GtkButton is used.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The default color when I pressed down the button is blue. I want to change the background color of button when it is pressed and recover its origin background color when it is released. <br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I tried to implemented it using the following code:<br><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GdkColor color;<br><div style="margin-left: 40px;">&nbsp;&nbsp; &nbsp;gdk_color_parse (&quot;red&quot;, &amp;color);&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;gtk_widget_modify_bg(GTK_WIDGET(button), GTK_STATE_ACTIVE, &amp;color);<br>
<br></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; However, it dose not work at all. <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Could anyone kindly give me some advices or suggestions ?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks in advance.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br></div>-- <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sincerely yours, <br><br>Yao Wang<br>
<br>Mobile Life Lab<br>Beijing University of Posts &amp; Telecommunications<br></div>