PDA

View Full Version : How can I move the splitter (Ext.resizer.Splitter) programmatically?



daniel.kuffner
16 Jan 2012, 5:54 AM
Hi All,

How can I move the splitter (Ext.resizer.Splitter) programmatically?
I search for something like:

getSplitter.setDivider(0.3)


Example code:

Ext4.create('Ext.container.Viewport', {
region: "center",
layout: {
type: 'vbox', // Arrange child items vertically
align: 'stretch', // Each takes up full width
padding: 5
},


items: [
Ext4.create("Ext.button.Button", { text: "First", flex: 1 }),
Ext4.create("Ext.resizer.Splitter", { }),
Ext4.create("Ext.button.Button", { text: "Second", flex: 1 })
]
});



Daniel

mitchellsimoens
16 Jan 2012, 10:55 AM
The splitter component doesn't do the resizing. The SplitterTracker does and after you do any positioning you need to call performResize.