Scrolling List Field/Table

J. Landman Gay jacque at hyperactivesw.com
Mon Nov 19 11:45:13 EST 2012


On 11/18/12 8:03 AM, Peter Haworth wrote:
> Hi Jacque,
> I'm converted!  Just not quite 100% there yet.  If I'm not mistaken, I have
> the same right justification problem if I use a standard table.
>
> I'd like to use the para style properties because no scrolling issues that
> way. I wonder if I can simulate the right justification.. maybe put the
> text into a hidden field, get its formatted width then somehow position it
> up against the tab on the right.  I'm not using a monospaced font but
> perhaps that could be made to work somehow.

If you do go with a monospaced font, the alignment isn't too hard. For 
the right-aligned columns, just run the content through this ancient HC 
function before putting it into the field:

function rightAlign theText,theWidth -- width of column in chars
   put char 1 to theWidth of theText into theText
   put char 1 to (theWidth-length of theText) of "                   " 
before theText -- or "after" for left-aligned
   return theText
end rightAlign

Use enough spaces between the quotes to cover the column width, for 
worst cases.

Or there's probably a better way now using the format function.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list