我正在寻找将文件树(dhtmlxTree)放在表单容器中。带有填充树的容器显示了正确的数据,但位于表单中的错误位置。我有点困惑为什么容器(里面有树)出现在我的表单的左上角。这会导致窗体中树容器上方的所有内容都被容器覆盖。通常,表单中的任何其他对象都会以正确的顺序显示而不会出现问题。为什么这个容器不同?
我该怎么做才能使容器与其他所有内容对齐?
formData = [
{type:"settings", position:"label-top"},
{type: "fieldset",name:"uploader", label: "Uploader", list:[
{type: "input", name: 'release', label: 'Release Name:',
required: "1", validate: "NotEmpty"},
{type: "container", name: "folders", label: "Select a directory:", inputWidth: 330, inputHeight: 200},
{type:"input", name:"releaseNotes", label:"Change Log Link:"},
{type:"file", name:"myFile", label:"Select an RPM",
required:"1", validate: "NotEmpty"},
{type:"button", name:"uploadbtn", value:"Upload"},
]}
];
myform = new dhtmlXForm('realUpload',formData);
folderLayout = new dhtmlXLayoutObject(myform.getContainer("folders"),"1C");
folderLayout.cells("a").hideHeader();
myTree = folderLayout.cells("a").attachTree(1);
myTree.setImagePath("../static/dhtmlx/imgs/csh_bluefolders/");
myTree.enableDragAndDrop(false);
myTree.enableIEImageFix(true);
myTree.loadXML("../static/data/evalTree.xml");