1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    14
    Vote Rating
    0
    TouchOfDestiny is on a distinguished road

      0  

    Default Button (Image + Text) as simple container for HTML link.

    Button (Image + Text) as simple container for HTML link.


    Hi,

    my question is very simple: how can I insert in a normal HTML link a button which simply displays an icon and a text (on the bottom)?

    I don't want (for the moment, that's why I would like to use a ExtJS button) to add any listeners to it. The HTML link functionality should not be overridden by the ExtJS button.

    I don't know if my question is clear. Maybe my approach to the problem is wrong...anyway...any suggestion is welcome.

    Thanks in advance,
    David

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    David,

    I am not sure what you are trying to achieve based on your description. Can you be more specific?

    Regards,
    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    14
    Vote Rating
    0
    TouchOfDestiny is on a distinguished road

      0  

    Default


    Hi Scott,

    thanks for you reply and sorry for my unclarity. What I would like to realise is following:



    This should be a ExtJS Button that act as a link. I would like to "attach" this ExtJS component (button) to a standard HTML link. My problems are:
    1) The link the button is attached to, should work normally, no functionality must be overridden by ExtJS. I succeeded in doing this by setting the config property preventDefault to false
    2) Can't succeed in putting the icon (a 48x48 .png picture) on the button (no icon is displayed, although I set cls:'x-btn-text-icon').
    3) The background color is not uniform: gray for a half, and white...don't know why...is there a way to set the color in order to have a, say, hell grey color when the button-link is not pressed and a dark-gray when the user clicks on it?

    Thank you very much,
    David





Thread Participants: 1