If I create such a widget that will pop out when it is needed. If so, I don't want to have it on the toolbar. Can I just set icon="" in the config.xml?
Hooray... This question is in the right forum. No you can not just exclude the widget icon because a default icon will be used. You will have to make changes to the HeaderControllerWidget.mxml to exclude your specific widget from being added. If you look at the getWidgetItems function you can add code to check if the widget label == yourwidget and if so then use the continue statement to jump to the next item.
Don't forget to click the Mark as answer check on this post and to click the top arrow (promote). Follow the steps as shown in the below graphic:
Hooray... This question is in the right forum. No you can not just exclude the widget icon because a default icon will be used. You will have to make changes to the HeaderControllerWidget.mxml to exclude your specific widget from being added. If you look at the getWidgetItems function you can add code to check if the widget label == yourwidget and if so then use the continue statement to jump to the next item.
Don't forget to click the Mark as answer check on this post and to click the top arrow (promote). Follow the steps as shown in the below graphic:
Does this not force the widget to automatically be loaded at startup though?.. If you want to open the widget from code based on some user click than adding it as a UI element is not the best route.
If I create such a widget that will pop out when it is needed.
I used Robert's approach to add the following code in getWidgetItems(widgetList:Array) ... if (widgetItem.label.toString() ! = "Find An Address") { widgetItem.open = widgetList.preload && (widgetList.preload == "open" || widgetList.preload == "minimized"); menuItems.addItem(widgetItem); } It works well