HI,
Please let me know if there is any control over the width and height of the control and per my previous inquiry, whether the folder pane can be hidden in situations where there is only one folder. Thanks.
Karl WIlkens
12/2/2007 6:26 AM
Yes, you can modify the size of the control on the client side. The example code below shows howto resize the control automatically to fit the browser window.
You can also hide the folder pane with a simple CSS command, see onControlLoadComplete function below.
Modify your host page body tag as <body onload=”onPageLoad”>
And then include the following js code, in your page’s external or internal js code:
var divFileVistaControl;
function onPageLoad() {
divFileVistaControl = document.getElementById("divFileVistaControl");
var pageWidth = Viewport.getWidth() - 4;
var pageHeight = Viewport.getHeight() - 4;
divFileVistaControl.style.position = "absolute";
divFileVistaControl.style.left = "0px";
divFileVistaControl.style.right = "0px";
divFileVistaControl.style.width = pageWidth + "px";
divFileVistaControl.style.height = pageHeight + "px";
addEvent(window, "resize", onPageResize);
controlLoadCompleteEvent = onControlLoadComplete;
}
function onPageResize() {
var pageWidth = Viewport.getWidth() - 4;
var pageHeight = Viewport.getHeight() - 4;
divFileVistaControl.style.width = pageWidth + "px";
divFileVistaControl.style.height = pageHeight + "px";
onControlResize();
}
function onControlLoadComplete() {
var divLeftPane = document.getElementById("divLeftPane");
divLeftPane.style.display="none";
}
Cem Alacayir
12/5/2007 5:08 AM
Actually, I also am trying to hide the folder pane. Using your example, I can hide the content but the pane is still there. I'd like the folder pane to be hidden also and the "files pane" to expand to the full width of the screen. Is that possible?
Dave
David Leland
12/13/2007 6:13 PM
Ok, just use the below onControlLoadComplete function instead of the above one to accomplish that effect:
function onControlLoadComplete() {
var divLeftPane = document.getElementById("divLeftPane");
divLeftPane.style.display="none";
var divPaneSeparator = document.getElementById("divPaneSeparator");
divPaneSeparator.style.display="none";
var divRightPane = document.getElementById("divRightPane");
divRightPane.style.left="0px";
onPageResize();
}
Cem Alacayir
12/17/2007 4:27 AM
Thanks. That works perfectly.
David Leland
12/17/2007 8:27 AM
Update:
We have added the "Fullscreen" property in v1.4.2 which will resize the control automatically to fit the browser window when set to true. Custom JS code is no longer required for this purpose.
Cem Alacayir
3/10/2008 6:21 PM
Is there any new property which will allow me to hide the "Folder" pane or do we still have to use custom JS code?
David Leland
12/19/2008 8:36 AM
No, there is no new property for hiding the folder pane yet but he JS code should still work ok.
Cem Alacayir
1/6/2009 3:31 PM