| Sample: dhtmlxWindows | User-Button | dhtmlxWindows main page |

Select Button |
Select Action |

    <head>
        ...
        <!-- attaching css containing user-button styles -->
        <link rel="stylesheet" type="text/css" href="codebase/skins/dhtmlxwindows_dhx_userbutton.css">
    </head>
    <script>
        var dhxWins = new dhtmlXWindows();
        ...
        // adding "Tray" user-button
        dhxWins.window(id).addUserButton("dock", 0, "Dock Window", "dock");
        // attaching event to "Tray" button
        dhxWins.window(id).button("dock").attachEvent("onClick", function(){
            alert('The window wants to be docked.');
        });</script>