[Prev][Next][Index][Thread]
Re: DUIM question
The class <table-layout> is the way to do this. Try the following in
the Dylan Playground:
contain(make(<table-layout>,
children: vector(make(<label>, label: "Short"),
make(<text-field>),
make(<label>, label: "Much longer"),
make(<text-field>)),
columns: 2,
x-spacing: 2, y-spacing: 5,
x-alignment: #[#"right", #"left"]));
The DUIM GUI test suite has a number of examples of this, try
the 'Borders' example for starters, in:
[FD]\examples\duim\duim-gui-test-suite\borders.dylan
Hope this helps,
Andy
---
Andy Armstrong
andrewa@functionalobjects.com
On Thu, 22 Jun 2000 01:15:05
John Whittaker wrote:
>What would be the simplest way to make a dialog with a series of text fields
>in a column, each with a text label to its left. I would like all of the
>text fields to align with each other. I've experimented with many of the
>keyword options to <row-layout>, but they don't seem to help (e.g.,
>equalize-widths: , x-ratios:, ratios:). The only thing I can come up with
>so far is to experiment with x-spacing: until the columns line up correctly
>as in the code below:
>
>
>define frame <thread-frame> (<dialog-frame>)
> pane latitude-pane (frame)
> make(<text-field>, label: "Latitude:",
> width: 30, fixed-width?: #t,
> activate-callback: not-yet-implemented);
>
> pane longitude-pane (frame)
> make(<text-field>, label: "Longitude:",
> width: 30, fixed-width?: #t,
> activate-callback: not-yet-implemented);
>
> pane data-layout (frame)
> vertically( )
> horizontally( )
> make( <label>, label: "Longitude");
> frame.longitude-pane;
> end;
> horizontally(x-spacing: 10)
> make( <label>, label: "Latitude");
> frame.latitude-pane;
> end;
> end; // vertically ()
>
>
> layout (frame) frame.data-layout;
> keyword title: = "KLN 94 RS 232 Info";
>end frame <thread-frame>;
>
>
>Thanks in advance for any help.
>
>
>
>
Send FREE Greetings for Father's Day--or any day!
Click here: http://www.whowhere.lycos.com/redirects/fathers_day.rdct
Follow-Ups: