avatar image
Former Member

SAPUI5 SegmentedButton aggregations: items and buttons

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).

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers

Skip to Content