Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DynamicForm colSpan fails when inside an HStack

    I'm working on a layout where I'd like a text box in a form to span multiple columns. This works fine when the form is contained within a VStack element, but only spans a single column when I change the containing layout item to an HStack.

    This is with SmartClient_v120p_2018-05-23_PowerEdition.

    I'll post one version of the code since a single letter change from V to H in VStack causes the troubling behavior.

    In this version the textArea spans 3 columns as expected:
    isc.VStack.create({
    ID:"prelimGradesHStack",
    autoDraw:false,
    width:"75%",
    isGroup:true,
    groupTitle:"<h3>Prelim</h3>",
    layoutMargin:8,
    edgeSize:5,
    showEdges:true,
    members:[
    isc.ListGrid.create({
    ID:"prelimGradesGrid",
    autoDraw:false,
    width:"30%",
    height:"100%",
    dataSource:"prelimGrades",
    canEdit:true,
    canRemoveRecords:true,
    warnOnRemoval:true,
    showGridSummary:true,
    listEndEditAction:"next",
    fields:[
    {
    name:"facultyMember",
    title:"Professor"
    },
    {
    name:"prelimGrade",
    title:"Grade",
    summaryFunction:"avg",
    hidden:true
    }
    ]
    }),
    isc.DynamicForm.create({
    ID:"prelimGradesButtons",
    autoDraw:false,
    numCols:1,
    fields:[
    {
    type:"button",
    title:"Add Score"
    },
    {
    type:"button",
    title:"Save"
    }
    ]
    }),
    isc.DynamicForm.create({
    ID:"prelimGradesForm",
    autoDraw:false,
    numCols:4,
    dataSource:"students",
    canEdit:true,
    titleOrientation:"left",
    fields:[
    {
    name:"prelimDate",
    title:"Prelim Date"
    },
    {
    name:"passedPrelim",
    title:"Passed Prelim",
    startRow:true
    },
    {
    name:"prelimReportTitle",
    title:"Prelim Report Title",
    type:"textArea",
    width:"*",
    colSpan:"3"
    }
    ]
    })
    ]
    });
    Attached Files

    #2
    Solved, sort of.

    This seems to be related to the titleOrientation. Switching the titleOrientation for the textArea to "top" causes the textArea to span the specified number of rows.

    Always fun to find these things after you post :-(

    RP

    Comment


      #3
      What's actually happening here is that the text area is filling the specified width of the DynamicForm (default of 100px) only. The form actually renders wider than that due to the other items overflowing the available space, so it appears that the text area isn't as wide as you'd expect.
      The easiest fix is probably to specify an explicit, larger width on your form, or possibly change your HStack to an HLayout [which manages the widths of its members] and explicitly specify the width of the DynamicForm to be "*" so it fills the available space within the layout.

      Comment

      Working...
      X