I haven't used Prima and my Perl version is so ancient that I couldn't easily get that library running on my machine. I have constructed a Tk way of doing this as shown below.

In Tk there is a "Frame" widget which usually has invisible borders. Things inside of a Frame widget get grouped. In the example below, there is a text label on the left; all of them are stuffed into a Frame. And then within that Frame, they are right justified and anchored to the east. The Frame will expand to accommodate the longest label.

In Prima, I see that there is a FrameSet gizmo. This may get you similar function to a Tk Frame.

Run this and let us know how close it is to your requirements.

Added:
I did set one width manually, the input field width, I forget what the units are but you can play around with it.

se warnings; use strict; use Tk; my $mw = MainWindow->new(); $mw->configure(-title=> "Some Title"); $mw->minsize(qw(700 200)); my $mainDataFrame = $mw->Frame()->pack(-side=>'top', -fill=>'x'); my $labelFrame = $mainDataFrame->Frame->pack(-side=>'left'); my $dataEntryFrame = $mainDataFrame->Frame->pack(-side=>'left'); my $unitsFrame = $mainDataFrame->Frame->pack(-side=>'left'); my $refreshRate; my $spectralRes; my $showSpectrumHz; my @tableConfig = ( ['Refresh rate:','60',\$refreshRate,'FPS'], ["Spectral resolution",'10',\$spectralRes,'Hz'], ["Show spectrum up to",'5000',\$showSpectrumHz,'Hz +']); for my $rowRef ( @tableConfig ) { $labelFrame->Label(-text => "$rowRef->[0]", -anchor=>'e', -justify => 'right')->pack(-side=>'top', -fill +=> 'x'); my $dataRef = $rowRef->[2]; # put default value into textvariable $$dataRef = $rowRef->[1]; $dataEntryFrame->Entry(-width => 8, -textvariable => $dataRef, )->pack(-side =>'top', -fill => 'x'); $unitsFrame->Label(-text => "$rowRef->[3]", -anchor=>'w', -justify => 'left')->pack(-side=>'top', -fill = +> 'x'); } MainLoop();

In reply to Re: Prima: How to get a "table" layout? by Marshall
in thread Prima: How to get a "table" layout? by haj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.