diff --git a/src/case/linearsegment/linear.segment.js b/src/case/linearsegment/linear.segment.js index b0b00f95b..41d282263 100644 --- a/src/case/linearsegment/linear.segment.js +++ b/src/case/linearsegment/linear.segment.js @@ -47,6 +47,14 @@ BI.LinearSegment = BI.inherit(BI.Widget, { getValue: function () { return this.buttonGroup.getValue(); - } + }, + + populate: function (buttons) { + var o = this.options; + this.buttonGroup.populate([BI.createItems(buttons, { + type: "bi.linear_segment_button", + height: o.height + })]) + }, }); BI.shortcut("bi.linear_segment", BI.LinearSegment); diff --git a/src/case/segment/segment.js b/src/case/segment/segment.js index 3f323ffb6..2c1dda918 100644 --- a/src/case/segment/segment.js +++ b/src/case/segment/segment.js @@ -58,6 +58,15 @@ BI.Segment = BI.inherit(BI.Widget, { getValue: function () { return this.buttonGroup.getValue(); }, + + populate: function (buttons) { + var o = this.options; + this.buttonGroup.populate([BI.createItems(buttons, { + type: "bi.segment_button", + height: BI.toPix(o.height, 2), + whiteSpace: o.whiteSpace, + })]); + }, }); BI.Segment.EVENT_CHANGE = "EVENT_CHANGE"; BI.shortcut("bi.segment", BI.Segment);