Datagrid: dgFormattedHeight geometry question

Trevor DeVore lists at mangomultimedia.com
Sat Aug 22 21:38:31 EDT 2009


On Aug 22, 2009, at 11:37 AM, David Bovill wrote:

> on DiscloseView someBoolean
>>   lock screen
>>   put the rect of me into oRect
>>   set the visible of grp "Toggle" of me to someBoolean
>>   LayoutControl oRect
>>   RefreshList
>>   unlock screen
>> end DiscloseView
>
> I am guessing that this technique does not properly change the
> geometry/dgFormattedHeight of the datagrid - but before I try teh  
> technique
> used in the Webinar (adding a visible entry to the dgArray for each  
> record)
> - I thought it would be worth checking what is going on here - or is  
> this a
> bug?

Hi David,

You are trying to manually update the data grid view but in so doing  
the data grid has no way of knowing that you are changing the size.  
LayoutControl is a handler in the template and therefore bypasses any  
logic in the data grid itself. RefreshList merely tells the data grid  
to resize itself.

Use the technique in the webinar as that triggers the routines that  
recalculate and redraw.

Regards,

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




More information about the use-livecode mailing list