1. #1
    Ext User
    Join Date
    Nov 2007
    Posts
    20
    Vote Rating
    0
    origin is on a distinguished road

      0  

    Default Custom Panel Tools

    Custom Panel Tools


    Hi all,
    Is it possible to add a custom tool to a panel? (i.e. via the panel->tools property)

    I know there is an extensive list, but I'd like to add a little bug icon.

    Cheers,

  2. #2
    Ext User
    Join Date
    Jan 2008
    Posts
    12
    Vote Rating
    0
    thommy is on a distinguished road

      0  

    Default


    A simple solution is to use one of the predefined tool items, change its icon (css) and implement an handler.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,942
    Vote Rating
    636
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      1  

    Default


    Tools are just implemented with css.

    You'll need to add:

    x-tool x-tool-yourID
    x-tool x-tool-yourID-over

    and apply the appropriate styles. As far as I can see, this is all you need to do.

  4. #4
    Ext User
    Join Date
    Nov 2007
    Posts
    20
    Vote Rating
    0
    origin is on a distinguished road

      0  

    Smile


    Thanks guys, a simple solution.

  5. #5
    Sencha User Jeegnesh's Avatar
    Join Date
    Feb 2013
    Location
    Khedbrahma
    Posts
    30
    Vote Rating
    0
    Jeegnesh is on a distinguished road

      0  

    Default


    you are right about add new tools.but problem is image what we attached is not displayed and you know what, handler of that image working fine. just image not displying.
    Code:
    CSS
    .x-tool-PDF
    {
                 background-image:url("Images/PDF_icon.png");
    }
    Code:
    chart.tools=[{  type: 'PDF', tooltip: 'Export to PDF',         
            handler: function() {
                gethtmlToPDF(arrTargetVsActualCharts[i]);
             }
         },
    }];

  6. #6
    Sencha User Jeegnesh's Avatar
    Join Date
    Feb 2013
    Location
    Khedbrahma
    Posts
    30
    Vote Rating
    0
    Jeegnesh is on a distinguished road

      0  

    Default


    yah that is my mistake.my image path is wrong

Thread Participants: 3