Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Christos Z on Dec 06, 2009 11:05
open dhtmlx forum
dhtlmx window minimise move to bottom resize

Hello, i absolutely love the dhtmlx window.
I have been trying for about a week now to do something that i though was rather simple but i am having a difficult time implementing it. What i would like is when a new window is created from clicking a link, when a user clicks on the minimize button, it makes the top bar and window as small as possible and bring it to the bottom of the page. kind of like in windows or linux when you minimize something, it brings it to the task bar. how can i do this please...here is the code for my new window creation

    var dhxWins = new dhtmlXWindows();
    dhxWins.enableAutoViewport(true);
    dhxWins.vp.style.border = "#909090 1px solid";
    dhxWins.setImagePath("../../codebase/imgs/");

    function createWindow(){
    var w1 = dhxWins.createWindow("w1", 10, 10, 320, 240);
    w1.setText("dhtmlxWindow #1");
    w1.button("close").enable();
w1.attachURL("http://www.google.ca");
    }

Thank You
Answer posted by Alex (support) on Dec 07, 2009 01:24

Hello,

there is not built-in method to do that. But the component provides the setPosition method that can be used in this case http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxwindows:api_method_dhtmlxwindowssngl_setposition.

Also you can use disable window moving -  http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxwindows:api_method_dhtmlxwindowssngl_denymove

Answer posted by Christos Z on Dec 10, 2009 17:05
Great thanks for that...now what about making it smaller automatically
for example, if my header toolbar is _____________________________________________________________ this big when in normal size
when i press minimize i would like for it to automatically become __________________ this small...as an example
any idea how to do this?
Thank for your quick reply by the way :-)
Answer posted by Alex(support) on Dec 11, 2009 01:20

You can try to use setDimension method to decrease window size:

dhxWins.window(id).setDimension(width, height);