Re: Button from an image (round Button)



Hi,

GtkButton has its own GdkWindow. It can be accessed like GTK_WIDGET (button)->window.

You can do the  "shape_combine_mask" for the GtkButton's window also. See that "shape_combine_mask" is done when it is realized.

--
Regards
Gautam



2008/2/27 Demetris Zavorotnichenko <fgcity4652 cytanet com cy>:

Hi everyone.

 

Forgive me if my question is going to sound silly. But I'm new to GTK so I have to ask.

 

I want to create a button that would not be as a normal button, but with a shape I have from a PNG image(with transparency)

 

I have tried to do "shape_combine_mask" , created the masks, but it seems this works only for windows.

 

But I need a button with the shape from a PNG image and if I press it I would call a function so the button would have roll_over, or atleast "clicked" signals. Plus I want to make a bunch of them to create a keypad so I would have to move them and arrange them in a loop.

 

 

How could I do this ?

 

PLS help out.

 

Yours truly, Demetris Z.


_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list




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