Question

I m creating a form in layout.I want to align the title in centre. example: Registration. Here is a simple code.

{
    // xtype: 'panel' implied by default
    title: 'Settings',
    region:'east',
    xtype: 'panel',
    margins: '0 0 0 0',
    width: 200,
    collapsible: true, 
    split: true,   // make collapsible
    id: 'egion-container',
    layout: 'fit'
 }

i want that title "Settings" in center

Was it helpful?

Solution

you can simply wrap title inside a div tag and do whatever you want :

{
    // xtype: 'panel' implied by default
    title: '<div style="text-align:center;">Settings</div>',
    region:'east',
    xtype: 'panel',
    margins: '0 0 0 0',
    width: 200,
    collapsible: true, 
    split: true,   // make collapsible
    id: 'egion-container',
    layout: 'fit'
}

OTHER TIPS

This is covered in the docs, there's a config called titleAlign.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top