This code is based on the Showcase sample we just linked to - you can drop it into that sample
Code:
function getRibbonButton (title, props) { return isc.IconButton.create(isc.addProperties({ title: title, icon: "pieces/48/cube_blue.png" }, props) ); } isc.RibbonGroup.create({ ID: "group", autoDraw: true, // fill parent width width: "100%", // auto-height - overflow to content height: 1, overflow: "visible", // no title showTitle: false, // one row numRows: 1, // if you want the icons to left-align in the group, rather than being spaced across the full width columnLayoutProperties: { // column-widths auto-size to button content width: 1, overflow: "visible" } }); // works whether or not you pass an index (including negative/out-of-bounds values) group.addControl(getRibbonButton("Video", { orientation: "vertical", icon: "pieces/16/pawn_yellow.png" }), 0); group.addControl(getRibbonButton("Link", { orientation: "vertical", icon: "pieces/16/piece_red.png" }), 100); group.addControl(getRibbonButton("Other", { orientation: "vertical", icon: "pieces/16/star_blue.png" }), null);
Leave a comment: