I am using a data grid and I need to resize the height depending on the resizing of the stack by the user. All works well until the height of the Data Grid is recalculated. From this moment on, the resizing of breaks visibly. The Data Grid is not placed on top of the bottom "footergroup". The group "footergroup" also suddenly does not resize with this last part of the script.
Has anybody see such problem with the Data Grid? Or is there any solution? My "workaround" here could only be to prohibit resizing of the stack which I do not really want to do.
Or am I blind and do not see what is wrong?
Here is the script fragment:
Code: Select all
on resizeStack w,h
// "DGList" is the Data Grid group
// The group "DGList" (Data Grid) is formatted in "table" style
local tDGHeight
--- Headergroup
if there is a group "headergroup" then
set the width of group "headergroup" to w
set the top of group "headergroup" to 0
set the left of group "headergroup" to 0
---
set the width of graphic "headerpane" to w
set the left of graphic "headerpane" to 0
set the top of graphic "headerpane" to 0
end if
--- Footergroup
if there is a group "footergroup" then
set the width of group "footergroup" to w
set the left of group "footergroup" to 0
set the bottom of group "footergroup" to h
---
set the width of graphic "footerpane" to w
set the left of graphic "footerpane" to 0
set the bottom of graphic "footerpane" to h
end if
// ERROR Data Grid group "dgList" breaking the handler
if there is a group "dgList" then
set the left of group "dgList" to 0
-- h is the height of the stack
put h - the height of group "footergroup" - the height of group "headergroup" - 60 into tDGHeight
// ERROR: Script breaks. DG group resized arbitrary, nothing works correctly:
set the height of group "dgList" to tDGHeight
set the bottom of group "dgList" to the top of group "footergroup"
end if
end resizeStack