Expression of dynamic resizing
More actions
As you know that we have rejected the IE emulation which makes IE DHTML Object Model work in FireFox. There are so many things to change and I hereby inform you a new way of resizing control height dynamically
Currently, there are two kinds of control which get involved in this issue, standard HTML element and CGGrid especially. In former code, we used setExpression method of control style object to handle resizing but it is not used any more. I have extended two methods with the same name as setHeightExpression, one for standard HTML and one for CGGrid ( because it has more works around )
PROTOTYPE
setHeightExpression( function delegate )
function delegate will take care of calculation which returns a numeric value for control height and it has a prototype as below
function resizeDelegate(control)
It is recommended that the function delegate should return a numeric value but you can do nothing like that; you can manipulate control height inside the delegate instead.
The parameter control could be the standard HTML element or grid control.
EXAMPLES
For grid control
function step3grid_InitializeLayoutHandler(gn)
{
var grid = igtbl_getGridById(gn);
grid.setHeightExpression(adjustHeight3);
}
function adjustHeight3(grid)
{
return (document.body.clientHeight - grid.MainGrid.clientTop);
}
For standard HTML element
The method is extended to jQuery library
$(proccessTextbox).setHeightExpression(AdjustHeigh);
function AdjustHeigh(element)
{
return document.body.clientHeight - element.offsetTop;
}