Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 SegmentedButton aggregations: items and buttons

Former Member
0 Kudos

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

0 REPLIES 0