Ruby Ruby wrote:

> I am trying to write a GUI ruby program using FXRuby.
> I am having some difficulties laying out the buttons,
> text fields and other widgets. I have been able to
> place these objects underneath each other, but that's
> not what I want.
> I would like to have a label with an entry field to
> the right of it.
> For example:

<snip>

For this kind of layout you'll usually need to nest layout managers 
inside of each other. It takes some experimentation at first, but after 
some practice it will become more natural to "see" which combinations of 
layout managers are appropriate for a given GUI.

For the case you're describing, you'll probably work with a collection 
of FXHorizontalFrames stacked on top of each other, perhaps inside an 
FXVerticalFrame:

     stack = FXVerticalFrame.new(parent, ...)
     row1  = FXHorizontalFrame.new(stack, LAYOUT_FILL_X)
     row2  = FXHorizontalFrame.new(stack, LAYOUT_FILL_X)
     row3  = FXHorizontalFrame.new(stack, LAYOUT_FILL_X)
     row4  = FXHorizontalFrame.new(stack, LAYOUT_FILL_X)
     #
     # ... and so on ...
     #

An FXHorizontalFrame lays out its child widgets from left to right 
(horizontally), so the widgets in 'row1' would be added like this:

     FXLabel.new(row1, "First Name:")
     FXTextField.new(row1, ...)
     FXLabel.new(row1, "Middle Name:")
     FXTextField.new(row1, ...)

Continuing on down the form,

     FXLabel.new(row2, "Last Name:")
     FXTextField.new(row2, ...)

     FXLabel.new(row3, "Phones - Office:")
     FXTextField.new(row3, ...)
     FXLabel.new(row3, "Home:")
     FXTextField.new(row3, ...)

and so on.

Hope this helps,

Lyle