Oct 20, 2011, 9:40 PM
dynamically set size of desktop window based on content
Love the desktop sample - wish there was more documentation.
I am creating a desktop window and i want to resize it to fit the content within the window.
I want the window to resize be just wide and high enough to fit the contents so it looks like (tasks_small.gif)
The size and number of fields in a given form is dynamic so i can't set a hard width...i want it to be liquid so it fits the contents with a certain amount of padding all the way around.
I am creating a desktop window and i want to resize it to fit the content within the window.
var w = desk.createWindow({
icon: "Application",
id: myWindow,
title: "My Window",
width: 1000,
height: 600,
maximizable: true,
minimizable: true,
autoLoad: {
url: url,
mode: "iframe",
showMask: true,
maskMsg: "Loading " + url + "..."
}
});
w.center();
w.show();
this of course shows the window 1000 pixels wide (see tasks_big.gif)I want the window to resize be just wide and high enough to fit the contents so it looks like (tasks_small.gif)
The size and number of fields in a given form is dynamic so i can't set a hard width...i want it to be liquid so it fits the contents with a certain amount of padding all the way around.