Results 1 to 3 of 3

Thread: NavigationView Bar

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    20
    Vote Rating
    0
      0  

    Default Answered: NavigationView Bar

    How do I add an image to navigationView bar?

    This works...
    navigationBar : {
    layout : 'hbox',
    items: [{
    xtype: 'button', text : 'melong'
    }
    ]},


    But, this doest NOT work

    navigationBar : {
    layout : 'hbox',
    items: [{
    xtype: 'image',
    src: './resources/images/logo.png'
    }
    ]},


    thanks,

  2. The navigation bar isn't that customizable yet. You can add/insert an item to the navigation bar after it has been created.

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    The navigation bar isn't that customizable yet. You can add/insert an item to the navigation bar after it has been created.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Oct 2010
    Posts
    20
    Vote Rating
    0
      0  

    Default

    so i tried to add an image after 'painted' event if I add the button then it works fine.. however, if I add the image then nothing shows up..

    Please show me an example.....

    somehow I have to the company logo in the center of the nav bar.....

    Thank you so much for your help, you already helped me a lot with other issues


    listeners : {

    painted : function (nav, eOpts) {

    console.log('painted');

    var btn = Ext.create('Ext.Button', {
    text : 'Ok'
    });

    var image = Ext.create('Ext.Img', {
    src : 'http://www.sencha.com/assets/images/sencha-avatar-64x64.png'

    });

    nav.getNavigationBar().add(image);


    }
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •