How to create a table field by a script?

Reinhold Venzl-Schubert r.venzl-schubert at macbay.de
Tue Jul 29 15:27:31 EDT 2008


Merci beaucoup, Eric!

"templatefield" is very smart. First creating the properties and  
later the field.
  I did not know it before. I think I will change some of my scripts ;-)

Reinhold


Am 28.07.2008 um 19:00 schrieb use-revolution-request at lists.runrev.com:

> You can't set the style of a field to 'table': it would be easy :-)
> But there is some specific properties to set that allow a field to be
> a table field:
>
> on mouseUp
>    CreateTableField --
> end mouseUp
> --------------------------------------------
> on CreateTableField
>    set the cREVGeneral["table"] of the templatefield to true
>    set the vGrid of the templatefield to true
>    set the hGrid of the templatefield to true
>    set the cREVTable["celledit"] of the templatefield to true
>    set the cREVTable["cellformat"] of the templatefield to true
>    set the tabStops of the templatefield to 75 -- or whatever
>    set the width of the templatefield to 300 -- or whatever
>    set the height of the templatefield to 200 -- or whatever
>    set the loc of the templateField to the loc of this cd -- or  
> whatever
>    set the vScrollBar of the templatefield to true -- if needed
>    set the hScrollBar of the templatefield to true -- if needed
>    create field
>    reset the templateField
> end CreateTableField
>
> Of course other properties of the templatefield can be set before
> creating the field: font, style, etc.




More information about the use-livecode mailing list