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

  • Home
  • SEARCH
  • 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 748759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:21:24+00:00 2026-05-14T14:21:24+00:00

I am adding one GtkVBox to GtkViewPort. And I am doing scrolling for GtkViewPort

  • 0

I am adding one GtkVBox to GtkViewPort.
And I am doing scrolling for GtkViewPort based on two Up/Down Buttons.

I need to display last item in VBox as we do in Message Chat Screens (Message Chat list displays/adds newest chat message at bottom of the list) i doing exact thing.

so for scrolling at the bottom of the GtkViewPort i am doing in the map event call back.

GtkAdjustment* adjustment;
adjustment = gtk_viewport_get_vadjustment(GTK_VIEWPORT(viewport_list));
gtk_adjustment_set_value(adjustment, gtk_adjustment_get_upper(adjustment));

So this works perfectly fine. it displays newest added widget in Vbox at the end.

on some external events I add new Widgets to my VBox and call above code again to display these newly added widgets. on first add it does not scroll at all but on 2nd add to VBOX it scroll upto 2nd last Widget in the list.

Why this might be happening.
It there another way of scrolling GtkViewPort to the end?

Thanks for reading 🙂

  • 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-14T14:21:25+00:00Added an answer on May 14, 2026 at 2:21 pm

    This is very probably happening because when you run your code, the GtkVBox hasn’t had time to grow, and/or the containing viewport hasn’t had time to re-compute the new upper bound of the adjustment.

    As I suggested in another version of this question, you should probably listen to the size-allocate signal from the GtkVBox to know when to re-try the jump to the bottom.

    If that doesn’t work (I haven’t tried this exact scenario), you could try hooking up to the changed signal of the GtkAdjustment itself. That will, along with some simple buffering, let you determine when the “upper” bound of the GtkAdjustment has increased, which is exactly when you want to change the adjustment’s value to the new upper bound.

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

Sidebar

Related Questions

I am having one GtkVbox and I am adding it to GtkViewPort . View
How would one go about adding a submenu item to the windows explorer context
This happens when I add items one at a time (adding one item and
In my iPhone/iPad app, I am adding one subview to my main view. This
So far, I've tried simply going through my labels and adding each one to
Adding more than one child to a WPF StatusBar results in poor layout with
Adding the row one by one in the button click.. (i tried but its
i am adding more than one link button during runtime but they all have
I would like to know how one goes about adding functionality from one open
I have seen various answers around helping explain adding records in one-to-many relationships but

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.