2

In ExtJS 4.2.2. I have an hbox container like this:

Ext.create('Ext.Panel', {
  width: 500,
  height: 300,
  title: "HBoxLayout Panel",
  layout: {
    type: 'hbox',
    align: 'stretch'
  },
  renderTo: document.body,
  items: [{
    xtype: 'panel',
    title: 'Inner Panel One',
    flex: 2
  },{
    xtype: 'panel',
    title: 'Inner Panel Two',
    flex: 1
  },{
    xtype: 'panel',
    title: 'Inner Panel Three',
    flex: 1
  }]
});

It is just the example in the docs. But i want the vertical line between the three different panels to be draggable, so the user is able to adjust the size of each panel.

Thank you for your help!

Tarabass
  • 3,132
  • 2
  • 17
  • 35

1 Answers1

5

You are looking for Splitter. Between your panels, add:

{xtype: 'splitter'}

Example: https://fiddle.sencha.com/#fiddle/r4h

Greendrake
  • 3,657
  • 2
  • 18
  • 24
  • You are awesome. So simple but I wasn't able to find it. Thank you very much – AxisStarstreamer Jul 26 '15 at 11:08
  • You can also use a border layout, instead of hbox, and set the items to 'split: true'. It depends on what you want.. http://docs.sencha.com/extjs/4.1.3/#!/example/layout/border.html – Tarabass Jul 27 '15 at 09:17