Re: White Bkground for image.



On Thu, 2003-06-26 at 22:15, James M. Cape wrote:
On Thu, 2003-06-26 at 16:57, Harring Figueiredo wrote:
 Folks,

 I am adding a GtkImage to a container. I would like the area on the container
to be blank so that the Image can be displayed nicely.

 Any hlep ?

 I saw the API for gtk_widget_modify_fg(...). But I quite did not understand
how I can set the GdkColor.

Sorry for my previous mail not going to the list!
My problem was that I have a button whose background I want to be such
that it displays the currently selected color and if clicked should
bring up a color selection dialog.

Currently I have the button with no label text. But if I do 
gtk_widget_modify_bg() on the button itself I just get a border of, say
red. The whole button does'nt get colored. Now I know that the button
contains a label so I got the label (via gtk_bin_get_child()) and tried
to set the bg on that - does'nt work.

I did read a FAQ entry mentioning that the label on a button is
transparent and so to change the bg color of a label I should set the bg
color of its container. But this does'nt seem to work.

Does anybody have any suggestions as to how I can get a button of one
color rather than just the border being colored

(I use Gtk2)

Thanks,

-------------------------------------------------------------------
Rajarshi Guha <rajarshi presidency com> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
"355/113 -- Not the famous irrational number PI, but an incredible
simulation!"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]