Hi, Dave,<br><br>Thanks for your advice.<br><br>However, my objective is to set two different colors for two different buttons. That is to say, for button A, when it is pressed, the color should be red; while for button B, in this case, the color should be green. <br>
<br>Thus I do not think the GTK+ theme can solve this problem. <br>Is there any other possible solutions?<br><br>Thanks in advance.<br><br><div class="gmail_quote">On Tue, Nov 25, 2008 at 10:23 AM, Dave Neary <span dir="ltr"><<a href="mailto:dneary@maemo.org">dneary@maemo.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Yao,<br>
<div class="Ih2E3d"><br>
Yao Wang wrote:<br>
> The default color when I pressed down the button is blue. I want<br>
> to change the background color of button when it is pressed and recover<br>
> its origin background color when it is released.<br>
<br>
</div>The default colour for when the button is pressed is set by the GTK+<br>
theme. I'd suggest changing the theme so that all buttons, when pressed,<br>
will be red. It's in general not a good idea to hack applications with<br>
hard-coded widget colours, and it's generally encouraged to write<br>
applications which are consistent with the rest of the environment.<br>
<br>
Hope this helps!<br>
Dave.<br>
<font color="#888888"><br>
--<br>
<a href="http://maemo.org" target="_blank">maemo.org</a> docsmaster<br>
Email: <a href="mailto:dneary@maemo.org">dneary@maemo.org</a><br>
Jabber: <a href="mailto:bolsh@jabber.org">bolsh@jabber.org</a><br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br> Sincerely yours, <br><br>Yao Wang<br><br>Mobile Life Lab<br>Beijing University of Posts & Telecommunications<br>