Header titles in dhtmLayout, Windows and accordion

Hi,

I wonder how to center the header title (or make it on the right side) on dhtmlxLayout, Windows and accordion?

Thankx

Hi,

you may place html as a header content. For example

win.setText(“

Window header
”);

Thank you very much !

It is working fine with windows and accordion headers but not with dhtmLayout. Any suggestions?

If i center the title, the window cannot be moved anymore. why does this happen?

You need to redefine a private method to enable moving:

  1. add the id to the container:

win.setText("<div id='wTitle' style='width:100%;text-align:center'>Window header</div>");

  1. redefine engineCheckHeaderMouseDown method:

[code]var titleCheck = dhxWins._engineCheckHeaderMouseDown;

dhxWins._engineCheckHeaderMouseDown = function(win,ev){
var element = ev.target||ev.srcElement;
if(element == document.getElementById(“wTitle”)) return true;
return titleCheck.apply(this,arguments);
}[/code]

Thanks for the reply. Is this function listed somewhere that i have to re-define or do i have to make my own function?

_engineCheckHeaderMouseDown is a private method. The approach that I’ve provided in the previous answer allows to redefine it for a certain windows object.

Thanks!