On May 5, 2009, at 5:14 PM, Yves COPPE wrote:

I try to make a form with a datagrid
the rowtemplate is 2 flds
the array for each row gives 2 text, one for the text fld "Data1" of the row and one for the text fld "Data2"
the formttedHeigth of each data is a variable

and I cannot find a script for the layoutcontrol to make the lines of each row with an appropriate height so that each text on each row is fully visible

how van I script a layout control ?

Yves,

Is the issue with determining how to resize the fields so they are as tall as the content they have to display? If you just want to resize the fields to fit the appropriate height then you can do something like the following. Just make sure and turn off fixed control height for the data grid.

on LayoutControl pControlRect
    -- set the width of fields if needed...

    -- Now resize to fit height
    put the rect of field 1 of me into theRect
    put item 2 of theRect + \
the formattedHeight of field 1 of me - the bottomMargin of field 1 of me \
        into item 4 of theRect
    set the rect of field 1 of me to theRect
end LayoutControl

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to