Hi Isomorphic,
along with this testcase there is another problem/question w.r.t. sizing, see this testcase (v12.0p_2020-04-27):
My issues here are:
Best regards
Blama
along with this testcase there is another problem/question w.r.t. sizing, see this testcase (v12.0p_2020-04-27):
My issues here are:
- The width displayed in the "debug"-Label telling about all the Widgets-width is are the same. The value for DynamicForm never changes, even if the widget clearly does. Perhaps this numbers don't refer to the drawn width, but I think they must be somehow accessible
- Resize of VLayout to it's maxWidth is never triggered (e.g. if you start and click "Very long title")
- DynamicForm looses it's right-padding (e.g. if you start and click "Very long title")
- DynamicForm.maxWidth seems to be ignored when there is a long title
- padding always present
- width extension if needed until a certain DynamicForm.maxWidth
- if this width makes it necessary to resize the parent VLayout, do so until it's maxWidth
- if content is too big and wrapping doesn't help, cut off (not clear where the clipping should be happening)
Best regards
Blama
Code:
isc.DynamicForm.create({ ID: "myDF", width: 500, maxWidth: 600, backgroundColor: "yellow", clipItemTitles: false, wrapItemTitles: false, numCols: 2, colWidths: ["*", "60"], isGroup: true, groupTitle: "DynamicForm group", border:"1px solid blue", padding:50, fields: [ {name: "enabled", title: "Enabled?", type: "boolean", width: "*", labelAsTitle: true, }, {name: "subject", title: "Short text", type: "text", width: "*", }, {name: "amount", title: "Amount", type: "integer", width: "*", editorType: "SpinnerItem", } ], updateFieldTitle: function (text) { this.getField("subject").setProperty('title', text); this.redraw(); widthsLabel.update(); } }); isc.Button.create({ ID: "shortTitle", width: 100, title: "Short title", click: "myDF.updateFieldTitle('Shrt ttl')" }); isc.Button.create({ ID: "mediumTitle", width: 100, title: "Medium title", click: "myDF.updateFieldTitle('Medium title')" }); isc.Button.create({ ID: "longTitle", width: 100, title: "Long title", click: "myDF.updateFieldTitle('Kinda long title with some details')" }); isc.Button.create({ ID: "veryLongTitle", width: 100, title: "Very long title", click: "myDF.updateFieldTitle('Crazy annoyingly loooooooooong title because of a i18n text waaaaaaaaaaaaaay longer than assumed')" }); isc.Button.create({ ID: "singleLetterTitle", width: 100, title: "Single letter title", click: "myDF.updateFieldTitle('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')" }); isc.Button.create({ ID: "clipItemTitles", width: 140, title: "clipItemTitles: true", click: "myDF.setProperty('clipItemTitles', true); myDF.redraw(); widthsLabel.update();" }); isc.Button.create({ ID: "noClipItemTitles", width: 140, title: "clipItemTitles: false", click: "myDF.setProperty('clipItemTitles', false); myDF.redraw(); widthsLabel.update();" }); isc.Button.create({ ID: "wrapTitle", width: 140, title: "wrapItemTitles: true", click: "myDF.setProperty('wrapItemTitles', true); myDF.redraw(); widthsLabel.update();" }); isc.Button.create({ ID: "noWrapTitle", width: 140, title: "wrapItemTitles: false", click: "myDF.setProperty('wrapItemTitles', false); myDF.redraw(); widthsLabel.update();" }); isc.HLayout.create({ ID: "buttonsLayout", members: [shortTitle, mediumTitle, longTitle, veryLongTitle, singleLetterTitle], membersMargin: 10, height: 20, width: "100%", }); isc.HLayout.create({ ID: "buttonsLayout2", members: [clipItemTitles, noClipItemTitles, wrapTitle, noWrapTitle], membersMargin: 10, height: 20, width: "100%", }); isc.Label.create({ ID: "widthsLabel", width: 500, height: 40, border: "1px solid grey", update: function () { this.setContents("VLayout width: " + myVL.width + " / " + myVL.getVisibleWidth() + "<br/>" + "DynamicForm width: " + myDF.width + " / " + myDF.getVisibleWidth() + "<br/>" + "shortTitle Button width: " + shortTitle.width + " / " + shortTitle.getVisibleWidth() + "<br/>" + "clipItemTitles Button width: " + clipItemTitles.width + " / " + clipItemTitles.getVisibleWidth() + "<br/>" + Math.random()); } }); isc.VLayout.create({ ID: "myVL", members: [myDF, buttonsLayout, buttonsLayout2, widthsLabel], membersMargin: 10, backgroundColor: "#eee", padding: 10, isGroup: true, groupTitle: "VLayout group", border:"1px solid blue", height: 460, width: 700, maxWidth: 800, overflow: "auto", }); isc.VLayout.create({ ID: "outerVL", members: [myVL], membersMargin: 10, backgroundColor: "#aaa", padding: 10, isGroup: true, groupTitle: "Outer VLayout group", border:"1px solid blue", height: "100%", width: "100%" });
Comment