aligning text in columns
andre.bisseret at wanadoo.fr
Wed Jun 11 20:14:52 CEST 2014
In some stacks, specially before the dataGrid, I right aligned using format (see "format" in the dictionary
For example, the following handler :
set the itemDel to tab
put fld "fData" into theData
repeat with x = 1 to the number of lines in theData
repeat with y = 1 to the number of items in line x of theData
if item y of line x of theData is a number then
put format("%13s",item y of line x of theData) into item y of line x of theData
put theData into fld "fData"
In this example, "13" is the number of chararacters which is possible in a column.
To use right align in this way it is necessary to use monospaced font in the field.
Le 10 juin 2014 à 19:28, Chris Sheffield a écrit :
> Do we have the ability yet to set the text alignment for individual columns in a table field?
> I have a very simple field with just two columns. I want the alignment of the first one to be left, and the second one to be right. A data grid is overkill, otherwise I’d go with that. I couldn’t remember if, with all the new field changes, that was added or not. I can’t seem to find any obvious properties, but I could be missing something.
> Or would it be best to just use two separate fields for this?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode