tools

Date: Tuesday January 6, 2009
Posted in: xn--nqv032a89i.com edit

  • Hi,

    I was using the tools properti that the panels and the windows have but there is only a few types of tools that can be use, I want know if there is a way to create more of these tools

    thanks


  • thanks that is exactly what I want


  • Actually....a better solution would just be to add your custom tool sprite image to the css class.

    ie:

    .x-tool-test{
    background:transparent url(some/images/my-tool-sprites.gif) no-repeat;
    background-position:0 -90px;
    }
    .x-tool-test-over{
    background:transparent url(some/images/my-tool-sprites.gif) no-repeat;
    background-position:-15px -90px;
    }


  • Thanks for this tip, works perfectly.
    Still, would the dev team consider creating a more flexible solution to achieve this that would not break on a complete Ext update, i.e. including an overwrite of image resources?
    Just like passing a "toolCls" parameter to pull a custom icon?


  • I don't know if 'few' is the right word to use - there are 19 built in.

    Its easy to create your own if you can create the sprite graphics and add them to the tool sprite image (/resources/images/default/panel/tool-sprites.gif) - there is a template in the same folder to get you started "tool-sprite-tpl.gif".

    Just pick a name for your tool...
    tools: [{
    id: 'test'
    }]

    and create the styles needed using the id you picked...

    .x-tool-test{background-position:0 -XXpx;}
    .x-tool-test-over{background-position:-15px -XXpx;}


    Change the XXpx to the Y location that your image falls on in the tool sprite image.


  • Sounds like a great idea - Ill see what everyone thinks about it and find out if we can get it added.







  • #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 tools , Please add it free.