hay guys, can you help me about window?
how make size windows fleksibel?? if big resolution size window change automatic
I hope you help me ^_^.
hay guys, can you help me about window?
how make size windows fleksibel?? if big resolution size window change automatic
I hope you help me ^_^.
You can try method setDimension() but you need to count content size.
docs.dhtmlx.com/doku.php?id=dhtm … tdimension
Can I ask you please be made an example? please
Try the next code sample:
[code]
Autosize Window<script src="../dhtmlxWindows/codebase/dhtmlxcommon.js"></script>
<script src="../dhtmlxWindows/codebase/dhtmlxcontainer.js"></script>
<link rel="stylesheet" type="text/css" href="../dhtmlxWindows/codebase/dhtmlxwindows.css">
<link rel="stylesheet" type="text/css" href="../dhtmlxWindows/codebase/skins/dhtmlxwindows_dhx_skyblue.css">
<script src="../dhtmlxWindows/codebase/dhtmlxwindows.js"></script>
<style>
html,body { height: 100%; margin: 0px; overflow: hidden; }
</style>
<script>
var w1;
function doOnLoad() {
var dhxWins;
dhxWins = new dhtmlXWindows();
dhxWins.enableAutoViewport(false);
dhxWins.attachViewportTo("winVP");
dhxWins.setImagePath("../dhtmlxWindows/codebase/imgs/");
dhxWins.createWindow("w1", 10, 10, 400, 400);
w1 = dhxWins.window("w1");
w1.setText("dhtmlxWindow #1");
w1.button("close").enable();
w1.center();
w1.stick();
w1.attachEvent("onClose", function(){
w1.hide();
});
}
var isAttached = false;
function usediv1() {
var div1 = document.getElementById('div1');
var my_width = div1.style.width;
var my_height = div1.style.height;
w1.setDimension(parseInt(my_width)+2,parseInt(my_height)+17);
w1.setText("div1");
w1.detachObject();
w1.attachObject('div1');
}
function usediv2() {
var div2 = document.getElementById('div2');
var my_width = div2.style.width;
var my_height = div2.style.height;
w1.setDimension(parseInt(my_width)+2,parseInt(my_height)+17);
w1.setText("div2");
w1.detachObject();
w1.attachObject('div2');
}
</script>