Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 421149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:57:17+00:00 2026-05-12T18:57:17+00:00

I want to display a simple GIF image in a VBox using GTK+ from

  • 0

I want to display a simple GIF image in a VBox using GTK+ from C. I know that I need to use a GdkPixbuf. But as usual there are no example of doing it. Can anyone provide help?

Also: In GTK+ how can we add a PNG image as background to a widget? Can anyone provide an example?

Forgot something to add this:

forgot to tell u that i am using Glade to develop GUI…
And i have created vBox in Glade and in one of the blocks of the vBox i need to display FIG Image….
Sorry of this…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:57:18+00:00Added an answer on May 12, 2026 at 6:57 pm
    1. gdk_pixbuf_new_from_file() — but see unwind’s answer for a better way to do it using a GtkImage widget.
    2. You need to set the background pixmap field in the widget’s style structure:

      GtkRcStyle *newstyle = gtk_widget_get_modifier_style(widget);
      newstyle->bg_pixmap_name[GTK_STATE_NORMAL] = g_strdup(pngfilename);
      gtk_widget_modify_style(widget, newstyle);
      

    PS. You can often find code examples by doing a Google search for the function you need an example of. The GTK docs usually don’t contain examples for every single function, because that would clutter them up, and the documentation of functions like gdk_pixbuf_new_from_file() is usually pretty straightforward. I’ve noticed you often post this kind of question and I’m wondering if you are looking for the documentation in the right place. For example, are you using the excellent reference tool DevHelp? On the other hand, the GTK documentation is really missing some important information in a few places. If you have some improvements, why not contribute to the documentation?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do a 'pop up image' using javascript to display a simple
I want to display a simple image of a ball in my applet (using
I want to display a simple array of strings in a ListPopupWindow that is
i want to use facebook's fb:dialog tag to display a simple pop-up form for
I'm using .NET 2.0 with standard controls. I want to display a simple list
I have a very simple data that i want to display in table. DATA
I have a simple problem using Jquery. I want to display detailed information under
I have a simple employee table that I want to display in a particular
On one of my sites, I want to display a simple image gallery with
Very simple...I just want to display a local pdf file that I have saved

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.