/scripts/ahub.form.attachments.js
0

SAPUI5 SegmentedButton aggregations: items and buttons

Nov 17, 2016 at 03:01 PM

37

avatar image

Why is it that this works:

var seg = new sap.m.SegmentedButton();
panel.addContent(seg);
panel.onclick = function() { seg.addButton(new sap.m.Button({text: "text"})); };

But this doesn't:

var seg = new sap.m.SegmentedButton();
panel.addContent(seg);
panel.onclick = function() { seg.addItem(new sap.m.SegmentedButtonItem({text: "item"})); };

In the second case only the first item shows up, while the first example works perfectly (I can add as many as I want).

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers

Skip to Content