Results 1 to 4 of 4

Thread: Ext.Button and background-image CSS

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext User
    Join Date
    Sep 2010
    Vote Rating

    Default Ext.Button and background-image CSS


    I would like to create my own tool bar, like the one there is in the Ext.form.HtmlEditor (the one with the "bold", "italic"... buttons).
    I manage to get an icon showing on these buttons by using the 'icon' property of the Ext.Button, but I do not manage to get the icon showing by using the 'iconCls' property

    My code looks like this :

    var toolBar = new Ext.Toolbar({standard config options...});
    var buttonBold = new Ext.Button({    
                                    id : 'boldBtn',
                                    enableToggle : true,
                                    cls : 'x-btn-icon',
                                    //iconCls : 'x-edit-bold',
    with the following CSS :

      background-image : url("bold.png");

    And my button is not filled with the 'blod.png' picture...

    Am I doing something wrong?

    And it would be perfect if I can use the 'tb-sprite.gif' which is the piture used by the HtmlEditor...
    I looked the code of the HtmlEditor but I can't find what I am missing here to get it working.

    Last edited by Duranne; 1 Oct 2010 at 6:10 AM. Reason: adds the CSS declaration

Similar Threads

  1. [FIXED-111] Home button image incorrect in ext-touch.css
    By nsjs in forum Sencha Touch 1.x: Bugs
    Replies: 2
    Last Post: 29 Jun 2010, 4:21 PM
  2. Replies: 2
    Last Post: 12 Apr 2009, 5:52 PM
  3. CSS background image from sprite - show on tree and panel
    By zombeerose in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Aug 2008, 6:31 AM

Posting Permissions

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