Closing widget from Button

531
1
10-25-2010 08:05 AM
JeremyMoore
New Contributor
Hey all,

Cant seem to figure out how to close a widget in the SFV 2.1 and set it's state to closed from external button.  Here is how I was trying to do it.

private function widgetClosedHandler(event:Event):void
   {
   
    clickGraphicsLayer.clear();
    map.cursorManager.removeAllCursors()
    map.infoWindow.visible = false;
    map.removeEventListener(MapMouseEvent.MAP_CLICK,identifyFeatures);
    this.setMapNavigation(null,null);


    wTemplate.widgetState = WIDGET_CLOSED;
                               ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_CLOSED,  this.widgetid))
   }

Thanks in advance,

Jeremy
Tags (2)
0 Kudos
1 Reply
JeremyMoore
New Contributor
I think I may have got it.

wTemplate.baseWidget.setState(BaseWidget.WIDGET_CLOSED);
0 Kudos