On 21/12/05, Shiraz Baig <[EMAIL PROTECTED]> wrote:
>
> Thanks. I shall try it.
> But please tell me,can I load a picture at runtime.
> For example, I click a button and a picture is loaded.
> Could you send me some sample code. I have done it in
> gtk+2.0 but have not succeeded doing it in glade.


I am not sure what you mean by doing it in glade..... After you load your
glade inteface control is given to gtk.... So for example on your main
function after loading the glade interface and connecting the signal and
before entering the main loop of the gtk you can initialise your images the
way you want... For that have a look on the GTK API. For example in a
GtkImage (as no other widget comes to mind that can display a picture) you
can use gtk_image_set_from_file()
http://developer.gnome.org/doc/API/2.0/gtk/GtkImage.html#gtk-image-set-from-file
to change the image displayed.


> --- Yiannis <[EMAIL PROTECTED]> wrote:
>
> > On 20/12/05, Shiraz Baig <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > Sir,
> > > I wish to display a picture (jpg) in one of the
> > > windows in glade. When I am selecting windows etc,
> > at
> > > that time, I can put a picuture in it, but at run
> > > time, it is not visible.
> > > Question is how to display a picture in glade.
> >
> >
> > Yes,  I had  similar problems.... Try putting the
> > picture on the same
> > directory as the .glade file.... Have a look on the
> > glade file to see the
> > filename of the image (provided you use libglade and
> > auto generated code).
> > Otherwise "initialise" your images in your main
> > program.
> >
> >
> > --
> > -- Yiannis
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>



--
-- Yiannis
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to