Re: layering of widgets?

From: Date: Sat, 04 Feb 2006 21:49:28 +0000
Subject: Re: layering of widgets?
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6649@lists.php.net to get a copy of this message
On Sat, 4 Feb 2006, Steph Fox wrote: > Hi Brian, > > I'm probably missing something basic here. > > What form does your pixmap take (is it a GtkPixmap widget or some GdkWindow > area that contains a GdkPixmap)? > > Does/should the dynamic text flow across the pixmap? > > I'm having some trouble visualizing what it is you want to achieve... the > apochyrphal 'short reproducing script' would be very useful for > troubleshooting. I have a GtkWindow with a GtkLayout in that and a GtkFixed in that. $box is the GtkFixed. Then I load my pixmap ie: /* load pixmap for machine outline based on config info for model, ignore conveyor type */ $transparent = &new GdkColor('#E3E3E3'); $machine_image = "pixmap/" . substr($configuration['MODEL'],0,4) . "_color.xpm"; list($pixmap, $mask) = Gdk::pixmap_create_from_xpm($window->window,$transparent,$machine_image); //$image = &new GtkPixmap($pixmap, $mask); //$box->put($image, 0, 0); $style = &new GtkStyle; $style->bg_pixmap[GTK_STATE_NORMAL] = $pixmap; $box->set_style($style); Commented part is how I was doing it previously, now I am setting the bg_pixmap style per Scott's suggestion which works. The pixmap is a picture representing the machine the software is controlling. Machine is an oven with multiple zones of temperature control. The GtkEntry widgets show the setpoint and actual for both temperature and wattage for that zone so the entry widgets are ->put() into the box such that they reside on top (think zindex) of the pixmap image. Previously my pixmap was just an outline of hte oven and the inner area (where the entry widgets are) being transparent. that worked fine but once I filled the outline inner area with color the entry widgets started flickering with each set_text call (once a second). Here is a screenshot to help you see what I'm doing even though I have a workaround now... Should give idea of what I mean by filled vs outline... http://churchoftux.com/gtk_screenshot.jpg

« previous php.gtk.general (#6649) next »