Results 1 to 5 of 5

Thread: How to remove icon on buttons

  1. #1
    Sencha User
    Join Date
    Jun 2014
    Posts
    3

    Default How to remove icon on buttons

    Hi,


    I am new to mobile development and new to Sencha as well.

    I have this app that has book thumbnails on it and under it is a button which say "View Book", and an eye icon on the left side. If the book expires, this button will change, and text changes into "Expired", without the icon. I don't want this expired button to have an icon, just the text, so I set the iconCls to " ". But then, it appears that it has a 3-character space before the button texts, which doesn't look nice. It seems it was the left & right padding reserved for the icon.

    I tried removing the setIconCls line, but it shows the icon of the "View Book".

    Any suggestions?

    Thank you in advance.

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Try call the button.removeCls.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha User
    Join Date
    Jun 2014
    Posts
    3

    Default

    I tried the removeCls, but it didn't worked.

    What I did is I only used setIconCls to " ", and then added padding-right to balance the space the icon had created on the left side of the button.

  4. #4
    Sencha User
    Join Date
    Jun 2014
    Posts
    3

    Default

    By the way, thank you very much for responding.

  5. #5
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Can you put together a fiddle illustrating this issue.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

Tags for this Thread

Posting Permissions

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