Ask a Question related to Ruby, Design and Development.
-
Ruby Ruby #1
Help with FXRuby widgets layout
Hello World,
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:
First Name:_______________ Middle Name:______________
Last Name:________________
Phones - Office:_________ Home:__________
Cell:________
Fax:____________
Pager:_______________
button1 button1 Etc.
I could create all of the above stacked.
I've been reading the layout manager but can't find
any example on how to do this.
Any help will be appreciated.
Thank you
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
[url]http://sitebuilder.yahoo.com[/url]
Ruby Ruby Guest
-
Widgets
I don't understand your question. What problems are you haveing 'with the window that is poped up'? "Rose Roland" <kicker@txucom.net> wrote in... -
Disappearing Widgets
It's hard to know exactly what it looks like, but a client in Hawaii says a site we are testing has a disappearing menu. I have a Spry Horizontal... -
spry widgets
cannot seem to get the validation select to work need to have code as dwcs3 does not do this automatically according to the help notes -
Curses::Widgets::Menu Question
Anyone with experience using this module--the following code fragment is supposed to run a sub after menu item selection is finished. What... -
What are the best 'presentational' tools, widgets, language
Does anyone know what is the best way is to create a highly attractive presentation set of screens for a (large) intranet Internet based business... -
Lyle Johnson #2
Re: Help with FXRuby widgets layout
Ruby Ruby wrote:
<snip>> 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:
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
Lyle Johnson Guest



Reply With Quote

