Announcement

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

    ToolStrip width with autoFitColumns

    SmartClient Version: v13.1p_2026-06-08/AllModules Development Only (built 2026-06-08)
    SmartClient Version: v14.1p_2026-06-11/AllModules Development Only (built 2026-06-11)

    Hi, In a grid I'm using autoFit as shown in the autofitColumns example, but I've also added a ToolStrip to the gridComponents:

    Code:
    isc.ListGrid.create({
        ID: "countryList",
        height:224, width:100,
        data: countryData,
        gridComponents: [
            isc.ToolStrip.create({
                ID: "strip",
                width: "*",
                members: [
                    isc.ToolStripButton.create({title: "one"}),
                    "starSpacer",
                    isc.ToolStripButton.create({title: "two"})
                ]
            }),
            "header", "body"
        ],
        fields:[
            {name:"countryCode", title:"Flag", width:65, type:"image", imageURLPrefix:"flags/24/", imageURLSuffix:".png"},
            {name:"countryName", title:"Country", width:100},
            {name:"capital", title:"Capital", width:100},
            {name:"continent", title:"Continent", width:100}
        ],
        autoFitData: "horizontal",
        autoFitMaxWidth: "100%"
    })
    However, I can't get the ToolStrip to take up all the available width:

    Click image for larger version

Name:	2026-06-12 18.18.16.jpg
Views:	0
Size:	10.9 KB
ID:	277598

    Is there a way to achieve this?

    Also, while looking for a possible workaround (for example by observing resized() on the grid), I noticed that if I do:

    Code:
    strip.setWidth(countryList.getViewportWidth());
    the grid becomes wider than the grid body itself:

    Click image for larger version

Name:	2026-06-12 18.18.19.jpg
Views:	0
Size:	11.8 KB
ID:	277599
Working...
X