# Controlling vertical position

**URL:** <https://www.ruby-forum.com/t/controlling-vertical-position/164591>\
**Category:** wxRuby\
**Created:** [April 2, 2009, 9:02pm UTC](https://www.ruby-forum.com/t/controlling-vertical-position/164591 "2009-04-02T21:02:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [April 2, 2009, 9:02pm UTC](https://www.ruby-forum.com/t/controlling-vertical-position/164591/1 "2009-04-02T21:02:08Z")

</div>

First, I want to thank everyone here who’s been helping me learn wxRuby.

The biggest problem I’m having is getting the layout of a screen right.

Right now, I have a dialog with several controls on it. With one  
exception, it looks good. I’m using wxFormBuilder and Xrcise to do the  
generation. I’m using nested box sizers to try to get things into the  
right positions.

On the upper corner of the screen, I have a box sizer (HORIZONTAL) with  
a label and a text edit control. Horizontally, they are perfect. They  
are, however, at the top of the sizer, and I’d like to move them down a  
bit in the sizer. They don’t have to be centered vertically, but they do  
need to move down some. I’ve tried everything I can think of, nesting  
other sizers in that sections, etc. but nothing seems to work correctly.

Would someone be so kind as to give me some ideas … or point me at  
some more tutorials on sizers and spacers. I’ve gone through all of them  
I can find on the documentation site.

Thank you _VERY MUCH_ … in advance.  
—Michael

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [April 5, 2009, 10:24am UTC](https://www.ruby-forum.com/t/controlling-vertical-position/164591/2 "2009-04-05T10:24:19Z")

</div>

There are two ways in which to do this in wxFormBuilder. A.) You can  
define  
the Border width, which is in Pixels, or you can use a Spacer, remove  
the  
wxEXPAND from it, set the proportion to 0, and define the height you  
want in  
pixels for the spacer to expand, there by moving the item(s) down from  
the  
top of the frame.

hth,

Mario

P.S. Sorry for the delay in the response, been busy building up a Gentoo  
System here.
