Thanks for your response. It does not work for me. Below is what I did.
1) In config.xml, I added id = "0" (or "1", "2") for the top three widgets.
2) In the widget w/ id="2", added the code in the wTemplate_openHandler(event:Event)
for each (var widgetId:Number in ViewerContainer.getInstance().widgetManager.getAllLoadedWidgetIds()) {
AppEvent.dispatch(AppEvent.TOC_HIDDEN, widgetId);
}
}
I run the debugging. For id=0 or 1, it went through AppEvent.dispatch(AppEvent.TOC_HIDDEN, widgetId). But the opened widgets are not minimized.
Could you tell what's wrong in the code?
Besides, how to get widgetTitle's value? In config.xml, should it be defined like that for a widget:
title="myWidgetTitle"?
Thanks.