Change icon image via widget library

For icons in a library, where you basically want an icon widget to be one of several variants, you could try one of these methods, which use a global variable to set the brand type. Each icon will set itself to the correct brand automatically when the page loads, and all this will persist in the Axure library.

  • If the icons do not need to have selection states, you could use the normal state for Brand A and the selected state for Brand B. Set the selected style to an image and import your Brand B image file. in the widget’s OnLoaded event, set “selected to true” if brandVar equals “B”.

  • If you use selection states for icon styling/swapping or if you need more than two icon brands/styles, then you could convert your icon to a dynamic panel. Create a new state for each brand. In the OnLoaded event for the dynamic panel, set the state accordingly.

Recent thread where I offered a few approaches for co-branding…