# Gtk Notebook size problem

**URL:** <https://www.ruby-forum.com/t/gtk-notebook-size-problem/226657>\
**Category:** Ruby-Gnome 2\
**Created:** [February 16, 2013, 9:07pm UTC](https://www.ruby-forum.com/t/gtk-notebook-size-problem/226657 "2013-02-16T21:07:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebruakagunduz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ea666f/32.png) [@ebruakagunduz](https://www.ruby-forum.com/u/ebruakagunduz)\
**Post date:** [February 16, 2013, 9:07pm UTC](https://www.ruby-forum.com/t/gtk-notebook-size-problem/226657/1 "2013-02-16T21:07:57Z")

</div>

Hi, i am doing a gtk application. I use notebook. If i enlarge my  
window, it is like this. [http://screencloud.net/v/6hLm](http://screencloud.net/v/6hLm)  
Why? How can i ensure right shape?

---

<div class="post-metadata">

**Author:** ![ebruakagunduz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ea666f/32.png) [@ebruakagunduz](https://www.ruby-forum.com/u/ebruakagunduz)\
**Post date:** [February 17, 2013, 12:41am UTC](https://www.ruby-forum.com/t/gtk-notebook-size-problem/226657/2 "2013-02-17T00:41:29Z")

</div>

Hello Ebru,

It looks like you have your VBox Sizer not setup to take the full size  
of  
the window, which will cause this behavior as you are seeing. The  
easiest  
way to ensure that all sizers are properly sizing to the size of the  
screen, is to ensure that whenever you add something to a sizer, you  
specify the attributes in which to size the child window, as such.

Programmatic way:

Gtk::HBox#pack\_start(child, expand = true, fill = true, padding = 0)  
Gtk::VBox#pack\_start(child, expand = true, fill = true, padding = 0)

Expand, when true, will ensure that no matter the size of the child  
widget,  
the container will expand from border to border, allowing the maximum  
size  
available for children widgets.

Fill, when true, will ensure that no matter the size of the container,  
the  
child will use all available space in the container for itself.

Padding will give you x amount of pixel spaces between the border of the  
container, and the border of the child widget that is being added to the  
Box.

Glade GUI Designer way:

When you select a child widget, Click on the Packing Tab, and check true  
or  
false for the Expand and Fill options. You may also have to select a  
different sizer to adjust a parent sizer, that has a child sizer in it.  
To  
select a parent sizer of a child sizer, right click on the control, and  
you  
should get the option to select the parent sizer from the context menu.

On Sat, Feb 16, 2013 at 8:07 PM, Ebru A. \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> is your hub for all things parallel software development, from weekly  
> thought  
> leadership blogs to news, videos, case studies, tutorials, tech docs,  
> whitepapers, evaluation guides, and opinion stories. Check out the most  
> recent posts - join the conversation now.  
> [http://goparallel.sourceforge.net/](http://goparallel.sourceforge.net/)
> 
> * * *
> 
> ruby-gnome2-devel-en mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

–  
Mario S.  
Fleet Captain  
CO - Geo 99  
CO - USS T’hy’la  
XO - Diplomatic Corps - Second Life  
[http://www.iftcommand.com/chapters/thyla/](http://www.iftcommand.com/chapters/thyla/)

> **[HOME | The Federation](https://www.trekfederation.com)**

---

<div class="post-metadata">

**Author:** ![ebruakagunduz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ea666f/32.png) [@ebruakagunduz](https://www.ruby-forum.com/u/ebruakagunduz)\
**Post date:** [February 17, 2013, 12:51am UTC](https://www.ruby-forum.com/t/gtk-notebook-size-problem/226657/3 "2013-02-17T00:51:23Z")

</div>

You are right, i had forgot expand. Thank you for help.

---

<div class="post-metadata">

**Author:** ![ebruakagunduz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ea666f/32.png) [@ebruakagunduz](https://www.ruby-forum.com/u/ebruakagunduz)\
**Post date:** [February 17, 2013, 6:29am UTC](https://www.ruby-forum.com/t/gtk-notebook-size-problem/226657/4 "2013-02-17T06:29:11Z")

</div>

Not a problem Ebru. 😉

On Sat, Feb 16, 2013 at 6:51 PM, Ebru A. \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> leadership blogs to news, videos, case studies, tutorials, tech docs,  
> whitepapers, evaluation guides, and opinion stories. Check out the most  
> recent posts - join the conversation now.  
> [http://goparallel.sourceforge.net/](http://goparallel.sourceforge.net/)
> 
> * * *
> 
> ruby-gnome2-devel-en mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

–  
Mario S.  
Fleet Captain  
CO - Geo 99  
CO - USS T’hy’la  
XO - Diplomatic Corps - Second Life  
[http://www.iftcommand.com/chapters/thyla/](http://www.iftcommand.com/chapters/thyla/)

> **[HOME | The Federation](https://www.trekfederation.com)**
