Expression of dynamic resizing: Difference between revisions
More actions
New page: 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 resi... |
No edit summary |
||
| Line 3: | Line 3: | ||
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 ) | 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 ) | ||
= | = <span style="color: #ff6600">PROTOTYPE</span> = | ||
<source lang="javascript">setHeightExpression( function delegate )</source> | <source lang="javascript">setHeightExpression( function delegate )</source> | ||
function delegate will take care of calculation which returns a numeric value for control height and it has a prototype as below | function delegate will take care of calculation which returns a numeric value for control height and it has a prototype as below | ||
<source lang="javascript">function resizeDelegate(control)</source> | <source lang="javascript">function resizeDelegate(control)</source> | ||
It is recommended that the function delegate should return a numeric value but you can do nothing like that; you can manipu | It is recommended that the function delegate should return a numeric value but you can do nothing like that; you can manipu<span id="fck_dom_range_temp_1242959171709_254" />late control height inside the delegate instead. | ||
The parameter control could be the standard HTML element or grid control. | The parameter control could be the standard HTML element or grid control. | ||
Revision as of 02:35, 22 May 2009
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 manipu<span id="fck_dom_range_temp_1242959171709_254" />late 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;
}