Results 1 to 2 of 2

Thread: Toolbar button image background issue... How?

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    28

    Default Toolbar button image background issue... How?

    Hello there,

    Code:
    Ext.each(dynamicToolbarButts, function(item) {
        self.add({
            xtype: 'button',
            // scale: 'large', // huh? nevermind..
            width: 52,
            height: 52,
            cls: 'my-amazing-btn',
            style: {
                // this is not woooorking, why?
                backgroundImage: '/images/rly_rly_rly_existing_image_and_its_small.png'
            }
        });
    });
    I want to set image-only big buttons on toolbar, how can I accomplish this?

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    You'll set the icon using the icon config pointing to an image - or you can source the image from a CSS class and use iconCls.
    Then just set your button height/width to accommodate.

    If you use icon you'll need to override the CSS rule: ".x-btn-default-small-icon .x-btn-icon-el" to be 52px tall/wide.

Posting Permissions

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