datagrid problem resolved

Yves COPPE yvescoppe at skynet.be
Sun Aug 16 05:09:44 EDT 2009


Hi list

if you have a fld in a datagrid ( Form style) and this fld (let us  
name him : "body") contains from row to row a variable text,
you will use a layout script in the following form :
    put item 2 of theRect + the formattedHeight of field "Body" of me  
into item 4 of theRect

It gives problems. if you want to avoid problems, you have to put a  
height to your fld "body" which is high enough so that the  
"formattedheight" can return a good value

    put item 2 of theRect + 50 into item 4 of theRect  -- "50" is  
arbitrary
    -- then set the rect
    set the rect of fld "Body" of me to theRect
    -- now get the correct value of the Formattedheight
   put item 2 of theRect + the formattedHeight of field "Body" of me  
into item 4 of theRect
   set the rect of fld "Body" of me to theRect

This work perfectly

Thanks to Trevor, I have send many mails to him to say "There is a  
problem, the layout script doesn't run appropriately !"
But Trevor didn't lose his patience and he found the solution !
Also my English is limited. Perhaps some users can give more  
"sophisticated" explanations.


Greetings.

Amicalement.

Yves COPPE
yvescoppe at skynet.be




More information about the use-livecode mailing list