Segmented buttons

A new addition in version 5 is segmented buttons, and they give us the possibility to show buttons as part of a group. In fact, the use of segmented buttons is actually the use of a specific container for a group of buttons. For this, we need to use the Ext.button.Segmented class by treating it similar to any container (which was discussed in previous chapters).

Using the previous example files (button_04.js and button_04.html), let's create a duplicate of these files and save them with the names button_05.js and button_05.html. Now, let's change the title of the buttons, remove the iconAlign property, and add the following after the last line of the code:

var mySegmentedbuttons = Ext.create('Ext.button.Segmented',{ renderTo:'segmentedbuttons', ...

Get Learning Ext JS - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.