dhtmlXwindows override dblclick on header to park

Hi, I’m trying to make windows park instead of maximizing/minimizing when dblclicking the header bar, I’m trying the following but it’s not working:

dhxWins._engineGetWindowHeader(dhxWins.window(win)).ondblclick='parent.dhxWins.window(win).park();

Any idea to what’s wrong please?

Stu

Hi,

the following would be more correct:

dhxWins._engineGetWindowHeader(dhxWins.window("w1")).ondblclick=function(){ dhxWins.window("w1").park(); }

Thanks Alexandra, works a treat! I was almost there :smiley:

Hi Alexandra,

I’ve noticed a slight problem with this, it not only parks when double clicking the header, it works by double clicking anywhere within the window… not quite the desired effect I’m afraid!

Stu

Hi,

you need to add into the event handler:

dhxWins._engineGetWindowHeader(dhxWins.window("w1")).ondblclick=function(e){ if(dhxWins._engineCheckHeaderMouseDown(dhxWins.window("w1"),e||event)) dhxWins.window("w1").park(); }

Hi Alexandra,

Excellent! Thank you!

Stu