form combo setFontSize

Hi

I know that combo boxes can be styled using css. I’d like to make the font larger on the combo. I noticed that in the visual designer I can achieve this using setFontSize and can achieve a form like this:


Visual Designer Code:

[code] dhtmlx.image_path=‘./codebase/imgs/’;

var main_layout = new dhtmlXLayoutObject(document.body, '3E');

var a = main_layout.cells('a');
var str = [
	{ type:"settings" , labelWidth:80, inputWidth:250, position:"absolute"  },
	{ type:"input" , name:"form_input_1", label:"Input", inputWidth:170, labelLeft:375, labelTop:175, inputLeft:455, inputTop:175  },
	{ type:"combo" , name:"form_combo_1", label:"Combo", connector:"./data/data_combo.json", inputWidth:170, labelLeft:375, labelTop:275, inputLeft:455, inputTop:275  },
	{ type:"input" , name:"form_input_2", label:"Input", inputWidth:170, labelLeft:375, labelTop:75, inputLeft:455, inputTop:75  }
];
var form_1 = a.attachForm(str);

form_1.setFontSize(“30” + “px”);[/code]

When I try to implement this form with the setSize in my own application the combo list does not resize. How can I make the combo box larger just like its done in visual designer?


My Code:

[code] test: function () {

    var str = [
        { type:"settings" , labelWidth:80, inputWidth:250, position:"absolute"  },
        { type:"input" , name:"form_input_1", label:"Input", inputWidth:170, labelLeft:375, labelTop:175, inputLeft:455, inputTop:175  },
        { type:"combo" , name:"form_combo_1", label:"Combo", connector:"data/lstSuppliers.php", inputWidth:170, labelLeft:375, labelTop:275, inputLeft:455, inputTop:275  },
        { type:"input" , name:"form_input_2", label:"Input", inputWidth:170, labelLeft:375, labelTop:75, inputLeft:455, inputTop:75  }
    ];

    generatorForm = appLayout.cells("a").attachForm(str);
    generatorForm.setFontSize("30" +"px");
}[/code]

Thanks.

Hi

Unfortunately combo does not support dyn height and font size, so you need to add the following css (for web skin):

div.dhxcombo_dhx_web { height: 44px; } div.dhxcombo_dhx_web input.dhxcombo_input { height: 44px; line-height: 43px; *height: 42px; *line-height: 41px; font-size: 30px; } div.dhxcombo_dhx_web div.dhxcombo_select_button { width: 40px; height: 40px; } div.dhxcombo_dhx_web div.dhxcombo_top_image { width: 48px; height: 44px; } div.dhxcombolist_dhx_web div.dhxcombo_option { font-size: 30px; height: 44px; line-height: 43px; } div.dhxcombolist_dhx_web div.dhxcombo_option div.dhxcombo_checkbox { width: 42px; height: 42px; } div.dhxcombolist_dhx_web.dhxcombolist_hdr div.dhxcombo_hdrtext { font-size: 30px; } div.dhxcombo_in_grid_parent input.dhxcombo_input { font-size: 30px; }

Thanks Andrei

Is this something that may be added in future?

Hi

I will add this suggestion into todo-list, but not sure when it will realized.