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 8860783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:20:14+00:00 2026-06-14T15:20:14+00:00

I have a scrolledwindow inside a main window. I want to when i click

  • 0

I have a scrolledwindow inside a main window. I want to when i click button refresh, content of scrolledwindow will refresh automatic.This is callback to button

vbox = gtk_vbox_new(TRUE, 5);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), vbox);
gtk_signal_connect(GTK_OBJECT(button_refresh), "clicked", GTK_SIGNAL_FUNC(button_re), NULL);

there is callback function:

 void button_re(GtkWidget *window, gpointer data){
connectserver(myFile, numof);//connect to server and get information
if(numof > 0){
    for(int i = 0; i< numof; i++){
        hbox = gtk_hbox_new(TRUE, 0);
        gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
        sprintf(buffer, "%s", myFile[i].name);
        label = gtk_label_new(buffer);
        button_down = gtk_button_new_with_label("Download");
        gtk_signal_connect(GTK_OBJECT(button_down), "clicked", GTK_SIGNAL_FUNC(button_download), (gpointer ) i);
        gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(hbox), button_down, TRUE, FALSE, 0);
    }
}else if(numof == 0){
    label = gtk_label_new("Have nothing on server");
    gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, FALSE, 2);
}

But when i click button, there are nothing happed. What should i do?
I’m so sorry because my english is not good.
Thanks !

  • 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-06-14T15:20:15+00:00Added an answer on June 14, 2026 at 3:20 pm

    In button_re you are creating new labels, buttons, etc. These won’t show up until you call gtk_widget_show on them, somehow. Somewhere in the initialization of your program – main() perhaps – probably you call gtk_widget_show_all on your main window, which recursively “show”s everything within it. But these new objects won’t be shown until you explicitly request that they are.

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

Sidebar

Related Questions

Have data that has this kind of structure. Will be in ascending order by
I have an Image Widget inside of a ScrolledWindow widget. The image's Show Scrollbars
I have wrote this simple plugin which smooth scrolls the browser window and adds
I have a treeview-widget inside a ScrolledWindow , which is populated during runtime. I
I have problem while adding a child to a GtkVBox. The VBox is inside
have written this little class, which generates a UUID every time an object of
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
Have finally got a responsive site working (of a fashion). What I want to
have Googled the cr*p out of this one so apologies if the answer is
I have a scrolled window, which contains a drawing area in pygtk. I would

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.