# wxRuby code examples!

**URL:** <https://www.ruby-forum.com/t/wxruby-code-examples/144148>\
**Category:** wxRuby\
**Created:** [July 25, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/wxruby-code-examples/144148 "2008-07-25T21:53:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gugui](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/9de053/32.png) [@gugui](https://www.ruby-forum.com/u/gugui)\
**Post date:** [July 25, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/wxruby-code-examples/144148/1 "2008-07-25T21:53:17Z")

</div>

Hi all ! I am new at wxRuby and need more code examples to learn better  
!  
IÂ´m searching in the Net but all with simple examples and i cant  
understand somethings yet…

Any special place to see some codes ?

thanks any help

---

<div class="post-metadata">

**Author:** ![gugui](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/9de053/32.png) [@gugui](https://www.ruby-forum.com/u/gugui)\
**Post date:** [July 25, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/wxruby-code-examples/144148/2 "2008-07-25T22:29:08Z")

</div>

Welcome to WxRuby!

specifically what things do not understand??

---

<div class="post-metadata">

**Author:** ![gugui](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/9de053/32.png) [@gugui](https://www.ruby-forum.com/u/gugui)\
**Post date:** [July 25, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/wxruby-code-examples/144148/3 "2008-07-25T23:01:50Z")

</div>

Fernando SÃ¡enz wrote:

> Welcome to WxRuby!
> 
> specifically what things do not understand??

For example, i cant yet to center a Frame on the display !  
Right, the API is there !

IÂ´m using..

Frame#centre

centre(Integer direction = BOTH)

Centres the frame on the display.  
Parameters

```
* direction The parameter may be HORIZONTAL, VERTICAL or BOTH.

```

but it dont work ☹

so I sure iÂ´m doing something wrong, and cant understand yet to join  
create the controls, events, layouts all the things together etc…

---

<div class="post-metadata">

**Author:** ![gugui](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/9de053/32.png) [@gugui](https://www.ruby-forum.com/u/gugui)\
**Post date:** [July 28, 2008, 2:17pm UTC](https://www.ruby-forum.com/t/wxruby-code-examples/144148/4 "2008-07-28T14:17:19Z")

</div>

Luiz M. wrote:

> but it dont work ☹

frame.centre(Wx::BOTH) works for me.
