Question

I'm looking to place a file tree (dhtmlxTree) in a form container. The container with the populated tree shows up with the correct data but is located in the wrong position in the form. I'm little confused why the container (with the tree inside) is appearing in the upper left corner of my form. This causes everything above the tree container in the form to be covered by the container. Normally any other object in the form shows up in the correct order without issue. Why is this container different?

What can I do to make the container line up with everything else?

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");
Était-ce utile?

La solution

You just need to miss the layout:

myTree = new dhtmlXTreeObject(myform.getContainer("folders"),"100%", "100%", 1);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top