Page 1 of 1

programmatic creation of datagrid?

Posted: Sun Jul 21, 2013 10:43 pm
by SteveTX
Can datagrids only be created through dragging to card from the IDE?

Re: programmatic creation of datagrid?

Posted: Mon Jul 22, 2013 4:24 am
by dunbarx
I don't know.

I was thinking it might be possible to set the properties of the templateGroup to all the properties of an existing dataGrid, and then when you create a new group, you get a new datagrid?

I don' think so. There are a lot of objects in a datagrid, and this object set is way beyond merely the properties of a group. Just thinking out loud here.

I don't know.

Re: programmatic creation of datagrid?

Posted: Mon Jul 22, 2013 5:24 am
by Simon
I'm thinking, since a DG is written in LC it can be done.
Probably a ton of work, is there a revDataGrid? hmm don't see one immediately.

Simon

Re: programmatic creation of datagrid?

Posted: Mon Jul 22, 2013 5:35 am
by SteveTX
I am sure it can be done via livecode, there is just no object creation function for the macro that is available. At least not yet...

Re: programmatic creation of datagrid?

Posted: Mon Jul 22, 2013 5:43 am
by makeshyft
you can make a copy of an existing datagrid group no?....isn't the "template stack" stored in one of the internal properties of the group?.... perhaps make a copy but change the template that it references ...and for sure u can change the template via the code.