docking windows questions

Hello,



I’ve the following declaration : win_event.addUserButton(‘dock’, 0, ‘Dock Window’, ‘dock’);



I was using “dhx_blue” skin for dhtmlxwindow. I’ve changed to “standard” skin and now the dock

button is not shown.



Question 1 : do you have an updated of the “standard” skin with dock button ?



Question 2 : what is the standard behavior of the dock button ?



Thanks for your answer :slight_smile:

The “standard” skin miss image for “dock” button ( it was not purposed for layout , so image was missed )
As fast solution you can copy
dhtmlxWindows\codebase\imgs\dhxwins_dhx_blue\active\btns_default\btn_dock.gif
to the
dhtmlxWindows\codebase\imgs\dhxwins_standard\active\btns_default\btn_dock.gif

>>what is the standard behavior of the dock button ?
It allows to attach window to the existing layout ( dock ) , or detach layout panel as separate window ( undock )

Hello :slight_smile:

I’ve noticed that the button exist in codebase/imgs/dhxwins_standard_button_dock folder.

How can I use this folder with the skin ?

Thanks for your answer :slight_smile:

  1. Except the “btns_default” folder you also should copy the “btn_dock.gif” from “btns_disabled”, “btns_over_default” and “btns_over_pressed” both for “active” and “inactive” parent folders (totally you should copy 8 files).

    2. Edit the dhtmlxwindows_standard.css
    copy here from dhtmlxwindows_dhx_blue.css the following rules:
    div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_blue table td div.button_dock_default {
    div.dhtmlx_window_active div.dhtmlx_wins_buttons_dhx_blue table td div.button_dock_disabled{

    totally 8 rules (for active/inactive windows, see lines 518-541 in dhtmlxwindows_dhx_blue.css)

    3. Event for button added automatically by the layout’s code, for stand-alone window you should do it manually like this:
    win.button(“dock”).attachEvent(“onClick”, function(win) {
        …

Hello :slight_smile:

Finally I’ve just add the following lines to the dhtmlxwindows_standard.css file
without copying any button file and it works :slight_smile:

/* dock (user button, used in layout) */
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_dock_default {
        background-image: url("…/imgs/dhxwins_standard_button_dock/active/btns_default/btn_dock.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_dock_default {
        background-image: url("…/imgs/dhxwins_standard_button_dock/inactive/btns_default/btn_dock.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_dock_disabled {
        background-image: url("…/imgs/dhxwins_standard_button_dock/active/btns_disabled/btn_dock.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_dock_disabled {
        background-image: url("…/imgs/dhxwins_standard_button_dock/inactive/btns_disabled/btn_dock.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_dock_over_default {
        background-image: url("…/imgs/dhxwins_standard_button_dock/active/btns_over_default/btn_dock.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_dock_over_default {
        background-image: url("…/imgs/dhxwins_standard_button_dock/inactive/btns_over_default/btn_dock.gif");
}
div.dhtmlx_window_active div.dhtmlx_wins_buttons_standard table td div.button_dock_over_pressed {
        background-image: url("…/imgs/dhxwins_standard_button_dock/active/btns_over_pressed/btn_dock.gif");
}
div.dhtmlx_window_inactive div.dhtmlx_wins_buttons_standard table td div.button_dock_over_pressed {
        background-image: url("…/imgs/dhxwins_standard_button_dock/inactive/btns_over_pressed/btn_dock.gif");
}

Question : do you will fix that for the next version or should I make a backup of this file ?

Thanks in advance for your answer :slight_smile:

Yes, we will add dock button to a list of default buttons for the standard skin.