Search code examples
sapui5structure

How to find which controlls that can use the icon attribute? [SAPUI5]


I am looking for controlls that can use the icon attribute in order to display the sap-icon://accept. Till right now i have been using button in order to display icons, but as of right now, the border that does make an button, isn't fitting for the task, as such, i am looking for a new controll, that supports icon attribute as well as onPress/onClick Events.

<Button icon="sap-icon://accept"/> //displays the accept icon, however it does an border that makes an Button.

Solution

  • There is sap.ui.core.Icon class for displaying icons.

    It also has press event you can use to click on that icon.

    <core:Icon src="sap-icon://accept" color="#8875E7" press="handlePress" />