# Expanding a Button in a GridSizer vertically

**URL:** <https://www.ruby-forum.com/t/expanding-a-button-in-a-gridsizer-vertically/212266>\
**Category:** wxRuby\
**Created:** [September 27, 2011, 6:06pm UTC](https://www.ruby-forum.com/t/expanding-a-button-in-a-gridsizer-vertically/212266 "2011-09-27T18:06:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [September 27, 2011, 6:06pm UTC](https://www.ruby-forum.com/t/expanding-a-button-in-a-gridsizer-vertically/212266/1 "2011-09-27T18:06:05Z")

</div>

Hi there,

when adding a Button to a GridSizer cell, i can expand it with the  
EXPAND flag horizontally. But how can i expand it vertically, so that it  
will fill the whole cell?

Thank you,

Simon

---

<div class="post-metadata">

**Author:** ![Simon\_Szustkowski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@Simon\_Szustkowski](https://www.ruby-forum.com/u/Simon_Szustkowski)\
**Post date:** [September 27, 2011, 7:35pm UTC](https://www.ruby-forum.com/t/expanding-a-button-in-a-gridsizer-vertically/212266/2 "2011-09-27T19:35:34Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Am 27.09.2011 17:47, schrieb Simon Szustkowski:

> Hi there,

Hi Simon,

> when adding a Button to a GridSizer cell, i can expand it with the  
> EXPAND flag horizontally. But how can i expand it vertically, so  
> that it will fill the whole cell?

Although I didn’t use GridSizer yet, I suspect you’are looking for the  
:proportion option. Have a look at  
[http://wxruby.rubyforge.org/doc/sizer.html](http://wxruby.rubyforge.org/doc/sizer.html) , especially on the section  
“Controlling the space given to Sizer elements”.

> Thank you,
> 
> Simon

Vale,  
Marvin

> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ wxruby-users  
> mailing list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://rubyforge.org/mailman/listinfo/wxruby-users](http://rubyforge.org/mailman/listinfo/wxruby-users)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.11 (GNU/Linux)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org/](http://enigmail.mozdev.org/)

iQEcBAEBAgAGBQJOggAOAAoJELh1XLHFkqha97wH/jBxd0f/11xyOMK7F9KiXEoU  
WF8jvJ9M+AZp+1punbBCq3LxqQMP36sIdUaFdL7G9ZOh9kJcyC03cT/3pMDi0kuX  
1EjKvPy+1MZYuxzPCJZa7EFW4RSaqEPO++BjrMxRBu23fkZFUyjWDzoqYu83qXHr  
OC408iqJJqPphziWsOz9sIXcF5CZ28Zd3ZJMIqoer5mMPy2DyIAP62kNqg7IV7uf  
2NztF3sIbfnFcOem5ybhEeZThuEjVTB3vydIHKHcBdwU8mlFF1rMcJLKpvFkzoYE  
+5Jghr2+lQGfexlKi/VUSl5kcCb2i1mT3KYbQcmz/FWCBtDuLvZPiWJLi7e/qvY=  
=JZB1  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Simon\_Szustkowski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@Simon\_Szustkowski](https://www.ruby-forum.com/u/Simon_Szustkowski)\
**Post date:** [September 28, 2011, 1:11pm UTC](https://www.ruby-forum.com/t/expanding-a-button-in-a-gridsizer-vertically/212266/3 "2011-09-28T13:11:26Z")

</div>

Hi,

thanks for your help. But i think this is not what i am searching for.  
The :proportion option is controlling the size of each cell, but not how  
to expand a widget in this cell to the borders of the cell. The EXPAND  
flag expands the buttons horizontally, but i need them to expand  
vertically as well. When playing around with the :proportion flag, i  
only change the space between the buttons, but not resizing them at all,  
if you know what i mean…
