Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    how to get Icon's name in IconButton

    Hi,
    I am using SmartGWt version 12.1-p20200520.

    I am using IconButton Component.

    if ("ApplyToAll.png".equals(display.getApplyToAllButton().getIcon()))
    This condition is returing false, whereas i am setting this icon only to IconButton.

    display.getApplyToAllButton().getIcon()) is returing null.

    Can you please help me in this, how can i get icon Name in IconButton, ie ''ApplyToAll.png'

    Thanks,
    Manpreet Kaur

    #2
    Sorry, what's the purpose of this? You provided the icon property, so you know what it is already..

    If you are trying to figure out what behavior the button should have by checking the name of the image it shows as an icon, that's pretty much the worst possibly property you could choose - it would mean that someone skinning the application to look different could break functionality, just by changing an image name. "title" would also be a bad choice due to internationalization concerns. We would recommend using a custom attribute.

    Comment

    Working...
    X