Image (Logo) in Toolbar

  • I need to insert simple logo image as first toolbar item, but i cannt find any solution.
    Is it possible? If yes then how?

    --
    Excuse me for my bad English.


  • My code:


    items:[
    {xtype: 'box',autoEl: {tag: 'img', src:'/i/logo.jpg'},
    {xtype: 'tbfill'},
    {text: 'News', controllerName:'news', handler: loadSection},
    {text: 'Files', controllerName:'files', handler: loadSection},
    {text: 'Articles', controllerName:'articles', handler: loadSection}
    ]

    it does not work with first item (image), but if i remove first item, all working fine.

    --
    Excuse me for my bad English.


    Try adding an instantiated BoxComponent:


    new Ext.BoxComponent({autoEl: {tag: 'img', src:'/i/logo.jpg'}})


  • My code:


    items:[
    {xtype: 'box',autoEl: {tag: 'img', src:'/i/logo.jpg'},
    {xtype: 'tbfill'},
    {text: 'News', controllerName:'news', handler: loadSection},
    {text: 'Files', controllerName:'files', handler: loadSection},
    {text: 'Articles', controllerName:'articles', handler: loadSection}
    ]

    it does not work with first item (image), but if i remove first item, all working fine.

    --
    Excuse me for my bad English.


  • Thanks a lot. It work's fine.

    --
    Excuse me for my bad English.


  • Add a raw BoxComponent to the Toolbar with an autoEl config which dictates the kind of element you want it to manage:


    {
    xtype: 'box',
    autoEl: {tag: 'img', src:'../shared/icons/fam/grid.png'}
    }


  • try this


    ...

    var tb = new Ext.Toolbar();
    tb.render('toolbar');
    tb.add({xtype:'tbtext',text:'   '}

    ,{
    ...







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Image (Logo) in Toolbar , Please add it free.

    7 January 2009 | cameltoepants.com | edit