// alert('h is: '+h+' min height is '+this.MinHeight+' MinControlsHeight is '+this.MinControlsHeight+' -> '+split+' to split between '+count+' new height is '+new_height);
// print_pre(this.Controls)
}
Form.ResetHeights = function()
{
for (var i in this.Controls) {
var options = this.Options[this.Controls[i]]
options['real_height'] = 0;
options.fixed = false;
}
this.FlexibleCount = this.Controls.length;
}
// Enlarge heights when possible
// Return any not split pixels number
Form.SplitExtra = function(split)
{
var number = 0;
for (var i in this.Controls) {
var options = this.Options[this.Controls[i]]
if (options['max_height'] ==0 || options['real_height'] < options.max_height) {
number++;
}
}
if (number == 0) return 0;
var delta = Math.floor(split / number);
// alert('splitting '+split+' between '+number+' delta is '+delta)
var added = 0;
for (var i in this.Controls) {
var options = this.Options[this.Controls[i]];
var to_add;
if (options['max_height'] != 0 && options['real_height']+delta > options['max_height']) {