On Fri, Jan 21, 2011 at 7:36 PM, Ray Horsley <[email protected]> wrote:
> Really? So there's no way other than this to add columns to a datagrid and,
> even more disappointing, there's no way at all to set column names from a
> script?
Ray,
You can by setting the dgProp["columns"] of a datagrid. This property
returns the names of the columns separated by returns.
Here is an example adding a column with an asking name at the end of a datagrid
command addColumn pWhichDG
local tDGColumnsList, tNewColNo, tNewColName
put the dgProp["columns"] of grp pWhichDG into tDGColumnsList
put (the number of lines of tDGColumnsList + 1) into tNewColNo
ask "Column name?" with "Col" & tNewColNo
if (it is not empty) then
put it into tNewColName
set the dgProp["columns"] of grp pWhichDG to tDGColumnsList &
return & tNewColName
end if
end addColumn
Best regards,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode