[Gtk-sharp-list] Window Background Image

Lee Turner lvturner at gmail.com
Wed Jun 28 11:22:29 EDT 2006


I ended up just using Gtk Image widgets then placing everything on top of
that, it gave the desired effect if being a bit hacky.

I've since abandoned Gtk as for what is required for this project it's not
suitable... using WinForms now.


Hopefully I'll get another excuse to play with Gtk# again in the future
though :)



On 28/06/06, Darren Warner <gtk-sharp at dazwin.com> wrote:
>
>
> The way I did this (I've seen this done elsewhere) is to use an hbox or
> table as the first widget on the window/dialog, put a GtkImage in the
> first cell and set it's row/col span to cover the
> entire window.
>
> I'm using Glade# and I also wanted the image to be embedded as a
> resource rather than as a separate file. AFAICT, you can't do this
> directly in Glade, so the image widget is just a placeholder and I load
> the image I want to use at runtime:
>
>         Gdk.Pixbuf pb = Gdk.Pixbuf.LoadFromResource("myimage.png");
>         background.Pixbuf = pb; // [Glade.Widget] Gtk.Image
>
> One problem I haven't been able to fix is getting the image to cover the
> entire background when a dialog is being used - there's a GtkHButtonBox
> at the bottom you can't change.
>
> -Darren
>
> Lee Turner wrote:
> > Hey all,
> >
> > I've just started work on porting an old delphi application to Mono.
> >
> > Essentially it is a childrens drawing application, so requires a fair
> > amount of graphics and icons. I was wondering if it was possible to put
> > a background image onto a window and have other images and/or buttons
> > (widgets) ontop of it, and if so how one would go about achiving this.
> >
> > Also, as part of the specification this application has to run on Mac OS
> > X under mono, is this possible with Gtk# or would I be best off using
> > Cocoa#? (running this app under operating systems isn't required but
> > would be 'nice')
> >
> > Cheers.
> > --
> > <generic witty comment>
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
>
>


-- 
<generic witty comment>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20060628/439ec781/attachment.html 


More information about the Gtk-sharp-list mailing list