GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Dec 02, 2015 6:57 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GtkDrawingArea and Z-Order
PostPosted: Mon Sep 24, 2007 1:51 pm 

Joined: Mon Sep 24, 2007 1:26 pm
Posts: 1

I'm trying to place GtkImage widget over GtkDrawingArea ( both are placed in GtkFixed widget). everything looks alright, except the order of widgets. no matter which of them is placed first, DrawingArea contents are always on the top of widgets. is there any way to pop GtkImage over the DrawingArea ?

here is a code snippet I use to draw this:

void scroller_space_redraw(GtkWidget *widget, gpointer data) {
gdk_draw_rectangle(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], TRUE, 0, 0, widget->allocation.width, widget->allocation.height);


scroller_space = gtk_fixed_new();
gtk_container_add(GTK_CONTAINER(scroller_eb), scroller_space);

scroller_background = gtk_drawing_area_new ();
g_signal_connect (G_OBJECT (scroller_background), "expose_event", G_CALLBACK (scroller_space_redraw), NULL);
gtk_widget_set_size_request(scroller_background, th.scrollbar1_width - 2, height - th.scrollbar1_up_height - th.scrollbar1_down_height);
gtk_fixed_put(GTK_FIXED(scroller_space), scroller_background, 1, 0);

scroller = gtk_image_new_from_file(th.scroller1);
gtk_fixed_put(GTK_FIXED(scroller_space), scroller, 0, 30);


thanks a lot and best regards


 Post subject:
PostPosted: Tue Sep 25, 2007 2:54 am 

Joined: Tue Sep 04, 2007 3:51 am
Posts: 2
The Fixed container 's behavior is always strange.My solution is that you use the same widget to implement widget overide in fixed widget.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group