DynamicForm Size Issues

Hi,

I’m experiencing various form size issue.

What I’m trying to do is very simple. Have a Window, which is 100% width to fit the browser screen, have a dynamicForm inside it, which must be 100% width too. And inside the form I need e button and text item on one row in proportion - let say 5% - 95%.

Here my code for the form:

isc.DynamicForm.create({
fields : [{
endRow : false,
title : “To:”,
formItemType : “ButtonItem”,
width : “"
}, {
name : “toField”,
showTitle : false,
formItemType : “TextItem”,
width : "
”
}],
autoDraw : false,
ID : “composeForm”,
height : “100%”,
width : “100%”,
backgroundColor : “orange”,
colWidths : [“5%”, “95%”],
cellPadding : 0,
itemLayout : “table”,
fixedColWidths : true
});

In the above case 5% should be near 50-60 pixels width on a resolution of 1280px width… but what is coming in my browser is a huge button near 250px. Even if I change the size of the first column to only 1% it does not affect the layout.

Second try, I’m changing: colWidth : [150, “100%”] - Now column sizes are working nice (I can see this in Firebug), but the textField (also tried with button) will never grow above 1001(1000) pixels???

And the third minor issue is that textFields always have width of 1 pixel more. If I set it to 200 - the actual size will be 201, which will cause scroll, but as I said this not of critical importance as the first problem.

I will be glad if you can give me some feedback on this layout issue.
Thanks,
Ivan

Getting a “works for me” result, Firefox 3 and IE7, running your code standalone (without a Window). Can you confirm? If so, this is probably an interaction with your layout-related settings on the Window - what are they?

Hi,
Thanks for the quick reply.

I experiment further with the issue.

I removed all windows and layouts and etc. to test it. Even downloaded a clean copy of the SDK, to be sure that something is not messed up in our custom version.

I’m still experiencing the issue with just the DynamicForm the only object on the page. For percentage values there is no difference in appearance between: [“1%”, “99%”], [“5%”, “95%”], [“10%”, “90%”] and etc. The two columns will start to resize correctly only when the proportions grow near 30% - 70% and above.

However after you note me that it work on you machine I tested another thing. I switched my resolution to 1024x768 and now it is obviously working fine with percentages. And with values like [50, “100%”] the textFiled again will not grow beyond 1000 pixels. But if I revert back to my native display resolution of 1280x1024 the troubles are back here.

I’m looking to hear from you further.

Thanks,
Ivan

Hi Ivan,

The maximum size issue (1000px) appears to be a native bug. The other issues you originally reported are not reproducible. Can you confirm?

Hi,

Yes I can confirm. Here I made a screenshot (IE7, but I tried other browsers and it is the same) to show the issue:
http://picasaweb.google.com/ivan.k.vladimirov/Screenshots#5257323718062842994

And this is the code I use. You can see that any col values in the range below 20%-80% are displayed the same way:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Tumbleweeed Prototype</title>
<link href="/isomorphic/skins/css/style.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript">
	var isomorphicDir = "/isomorphic/";
</script>
<script src="/isomorphic/system/modules/ISC_Core.js" type="text/javascript"></script>
<script src="/isomorphic/system/modules/ISC_Foundation.js" type="text/javascript"></script>
<script src="/isomorphic/system/modules/ISC_Containers.js" type="text/javascript"></script>
<script src="/isomorphic/system/modules/ISC_Grids.js" type="text/javascript"></script>
<script src="/isomorphic/system/modules/ISC_Forms.js" type="text/javascript"></script>
<script src="/isomorphic/system/modules/ISC_DataBinding.js" type="text/javascript"></script>
<script src="/isomorphic/skins/SmartClient/load_skin.js" type="text/javascript"></script>
<script src="/isomorphic/system/modules/ISC_RichTextEditor.js" type="text/javascript"></script>
<style type="text/css">
	html { overflow: hidden; }
	body { margin: 0px; }
</style>
</head>
<body>
<script language="javascript" type="text/javascript">
	isc.DynamicForm.create({
		fields : [{
			endRow : false,
			title : "To:",
			formItemType : "ButtonItem",
			width : "*"
		}, {
			name : "toField",
			showTitle : false,
			formItemType : "TextItem",
			width : "*"
		}],
		autoDraw : false,
		ID : "composeForm",
		height : 20,
		width : "100%",
		backgroundColor : "orange",
		colWidths : ["1%", "99%"],
		cellPadding : 0,
		itemLayout : "table",
		fixedColWidths : true
	});
	
	isc.DynamicForm.create({
		fields : [{
			endRow : false,
			title : "To:",
			formItemType : "ButtonItem",
			width : "*"
		}, {
			name : "toField",
			showTitle : false,
			formItemType : "TextItem",
			width : "*"
		}],
		autoDraw : false,
		ID : "composeForm2",
		height : 20,
		width : "100%",
		backgroundColor : "orange",
		colWidths : ["10%", "90%"],
		cellPadding : 0,
		itemLayout : "table",
		fixedColWidths : true,
		top : 20
	});
	
	isc.DynamicForm.create({
		fields : [{
			endRow : false,
			title : "To:",
			formItemType : "ButtonItem",
			width : "*"
		}, {
			name : "toField",
			showTitle : false,
			formItemType : "TextItem",
			width : "*"
		}],
		autoDraw : false,
		ID : "composeForm3",
		height : 20,
		width : "100%",
		backgroundColor : "orange",
		colWidths : ["20%", "80%"],
		cellPadding : 0,
		itemLayout : "table",
		fixedColWidths : true,
		top : 40
	});
	
	composeForm.draw();
	composeForm2.draw();
	composeForm3.draw();
</script>
</html>

…Actually now I release that the above is caused again by the 1000px limitation. Since the field is limited to this size ,the button in the first column is stretching to fit it no matter what the column values are.

Time to examine how to fix this issue, because we are going to use plenty of such layouts.

If you can help on this, please post in this thread.

Thank,
Ivan