Custom widget vs master


#1

Hi, I work on team project and have both my main project and library. I have started by adding custom predictive search in the team library and modified some colors (to red). I have updated it to use custom widget styles (added new unique names). Then I’ve used my widget in my main project and that’s fine, it uses red.

Then I’ve modified widget in the library (changed color to black). And I want to automatically update the modified widget in all the occurrences of custom predictive search in my main project. But I don’t see ‘update’ near widget style or any other way to update.

I could possibly use master instead of widget in the library but I think masters are not invented for that purpose.

What do you advise?


#2

If it is just styling you want to update, and you’ve created custom styles in the Style Manager, then you can just update the style, e.g., change the Fill and/or Line color. Then all widgets assigned to that style name will be updated (unless some style properties have been manually overridden.)

So, if you made a style named, “Search Field” with a black border, and later change that border/line color to red, then all widgets with a style of Search Field would automatically have a red border, regardless of whether they came from a library, master, or not. However, if you made a style named “Black Border” and assigned it to a Library widget, then changed your mind and wanted that widget to have a different style, which you named “Red Border” then it would apply only to that widget in the Library, not all previously placed widgets.

It is important to realize that Libraries define the default style and behavior only. Once placed on the page, they are independent of that Library. Think of them as templates. Custom Styles and the Style Manager on the other hand are just like CSS style sheets. If you assign a style to a widget and later change that style, the widget will pick up those changes.

Masters are the way Axure supports “updatable” styling and behaviors. When you drag in a Master, you get a linked copy, or an “instance” of that Master. Double-click it to edit it and you’ll see you are in that same Master. Once I drag a Master onto my page I think of it as a pointer to the Master. Change something in a Master, and all instances of that Master are changed.

You can use Masters in your library widgets, so as you drag them on a page they inherit the styling and behaviors of the Master, and if you later update the Master you will see changes automatically updated in every instance of that Master (as long as you haven’t chosen the “break away” option for a given instance.)