1

Essentially I have the following parent/child structure:

  • GtkWindow - Set values for width_request and height_request
    • GtkFixed
      • GtkViewport - Set values for width_request and height_request that are smaller than those set for the parent GtkWindow
        • GtkBox - lets call this ParentBox
          • GtkExpander
            • GtkScrolledWindow
              • GtkViewport
                • GtkBox
                  • A lot of other widgets taking up a lot of space
          • GtkBox - lets call this ChildBox
            • A lot more widgets taking up space

What is currently happening is that when I expand the GtkExpander, it only expands in the vertical dimension as much as possible such that everything within ChildBox is still displayed within the window.

What I would like to have happen is GtkExpander expand to cover the entire height_request of GtkWindow (which would still require the scroll bar), thus pushing everything in ChildBox off the screen and no longer viewable. Then collapsing GtkExpander would bring ChildBox back into view. Is this possible, and if so, how?

halexh
  • 3,021
  • 3
  • 19
  • 19
  • Hi, just to be sure of what you would like to achieve could you provide a visual representation of the effect you need? I think I know how to do it, but just want to be exactly sure – Vladouch Jun 08 '22 at 20:53
  • @Vladouch Its hard to depict in a image. I will try explaining it differently. Basically, I just want GtkExpander to expand and push everything in "ChildBox" off the screen. In the current implementation, when I expand GtkExpander the entire window increases in the vertical dimension so that "ChildBox" is still displayed in the window. I was able to sort of resolve this by placing everything in a Gtk ScrolledWindow. However, it only worked if I had the scroll bar on the ScrolledWindow enabled. This isnt a solution though, as I cant have a scroll bar at this level. – halexh Jun 14 '22 at 12:53

0 Answers0