Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jonathan on Jul 10, 2009 04:03
open dhtmlx forum
How to define skin with attached

Hi.
How to define the skin for the toolbar when it is attached to the created window?

Example :
/* Created window */

dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("../../../dhtmlx/dhtmlxWindows/codebase/imgs/");
dhxWins.setSkin("blue_sky");

man_calendario = dhxWins.createWindow("man_calendario", 400, 160, 500, 400);
man_calendario.setText("Calendario laboral");
man_calendario.denyPark();    
man_calendario.button("park").hide();
man_calendario.button("minmax1").show();
man_calendario.button("close").hide();
man_calendario.center();

/* Created toolbar and attach to window */

var toolbar = man_calendario.attachToolbar();
toolbar.setIconsPath("../../../dhtmlx/images/");    
toolbar.addText(0,6,"Año en vigor: "+anho_actual);
toolbar.loadXML("dhtmlxtoolbar.xml");

/* Created grid and attach to window*/

var grid = dhxWins.window("man_calendario").attachGrid();
grid.setImagePath("../../../dhtmlx/dhtmlxGrid/codebase/imgs/");
grid.setHeader("Año, Fecha, Nota");
grid.setColSorting("int,date,str");
grid.attachHeader("#text_filter,#text_filter,,");
grid.setInitWidths("100,150,*");
grid.setColTypes("ro,ro,ro");
grid.setColAlign("center,left,left");
grid.attachEvent("onRowSelect",registroSeleccionado);
grid.groupBy(0);
grid.setSkin("light");
grid.attachFooter("Total fechas: {#stat_count},#cspan,#cspan");
grid.init();
grid.loadXML("xml_calendario_laboral.php");

This is the code, but it doesn't apply the skin to the toolbar, but if I apply the skin to window "dhx_blue" without problem.
Answer posted by Alex (support) on Jul 10, 2009 04:14

Hello,

unfortunately window API doesn't allow to set toolbar skin - it is set automatically.

But it can be done by a small modification in the  dhtmlxwindows_wtb.js file. This approach was already discussed - please, see details in here:

http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=8725&a=13703