Fairly new to ExtJS 6, how do I align the tree panel to the center or right of the panel. Been trying to do this for weeks. Please assist
Asked
Active
Viewed 691 times
0
-
By aligning tree panel you mean tree panel items? What have you tried so far? – scebotari66 Jul 08 '17 at 07:28
-
Yes the items inside, it seems by default, the items are aligned to the right and it its a columns, I have to say (align: 'left') but I don't know how to align left for a tree panel – Asanda Lamba Jul 10 '17 at 10:09
1 Answers
0
This is what API Docs say:
By default a TreePanel contains a single column which uses the text Field of the store's nodes.
You might declare the tree column with the text
dataIndex and the specify the align:
Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 200,
height: 200,
store: store,
rootVisible: false,
renderTo: Ext.getBody(),
columns: [{
xtype: 'treecolumn',
dataIndex: 'text',
flex: 1,
align: 'end'
}]
});
Here is the fiddle: https://fiddle.sencha.com/#view/editor&fiddle/22tu.
Not sure if you are trying to align only certain components or all of them. If the latter is the case, you might want to take a look at Sencha's "Right-to-Left Support in Ext JS" guide.

scebotari66
- 3,395
- 2
- 27
- 34