Announcement

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

    DynamicForm Item.showTitle=false question

    If I set item.showTitle = false for any item in DynamicForm and do not specify colSpan, the item occupies the width of the title column. Do I need to manually set colSpan, or is this a bug?

    Here’s an example to reproduce this behavior, taken from here:
    https://smartclient.com/smartclient-...rmLayoutTitles

    Code:
    isc.DynamicForm.create({
        ID: "exampleForm",
        width: 300,
        fields: [
            {name: "username",
             title: "Username",
    showTitle: false,
             type: "text",
             width: "100",
             required: true,
             defaultValue: "bob"
            },
            {name: "email",
             title: "Email",
             required: true,
             width: "*",
             type: "text",
             defaultValue: "bob@isomorphic.com"
            },
            {name: "password",
             title: "Password",
             width: "*",
             required: true,
             type: "password"
            },
            {name: "password2",
             required: true,
             title: "Password again",
             width: "*",
             type: "password",
             wrapTitle: false
            }
        ]
    });
    
    isc.Button.create({
        ID: "swapButton",
        height: 36, margin: 2,
        title: "Swap titles",
        click: function () {
            exampleForm.setTitleOrientation(exampleForm.titleOrientation == "top" ? "left" : "top");
        }
    });
    
    isc.HLayout.create({
        members:[exampleForm, swapButton]
    });
    Last edited by Hirn; Today, 00:10.

    #2
    That's expected behavior - by default, items take up two cells if they have a title, one otherwise. Since the second item has a title, it needs two columns, so it appears on the next line.

    Comment

    Working...
    X