Dear FriendsHow to make gtk_event_box with an label inside respect the background image defined on the window. Other controls on same window like radios, checkbox and buttons, apear correct on the image background
i create the background with the followvoid SetWindowBackImage(GtkFixed box, char * szFileName, int x, int y, int h , int w )
GtkWidget * hCtrl; GdkPixbuf * handle = gdk_pixbuf_new_from_file( szFileName, NULL ); GdkPixbuf * pHandle= alpha2pixbuf( handle, 16777215 ); hCtrl = gtk_image_new_from_pixbuf(pHandle); if ( box ) gtk_fixed_put( box, hCtrl, x,y); gtk_widget_set_size_request( hCtrl,h,w ); } and the label i create with void CreateLabel(GtkFixed box, char * cTitle, int x, int y, int h , int w ) { GtkWidget * hCtrl, * hLabel; GtkFixed * box; GdkPixbuf * handle ; GdkPixbuf * pHandle; hCtrl = gtk_event_box_new(); cTitle = hwg_convert_to_utf8( cTitle ); hLabel = gtk_label_new( cTitle ); g_free( cTitle ); gtk_container_add( GTK_CONTAINER(hCtrl), hLabel ); g_object_set_data( (GObject*) hCtrl, "label", (gpointer) hLabel ); } if ( box ) gtk_fixed_put( box, hCtrl, x,y); gtk_widget_set_size_request( hCtrl,h,w); } Regards and thanks in advance Luiz Rafael
Attachment:
seda.bmp
Description: Windows bitmap