Hide Widget

773
13
01-24-2011 04:33 AM
CharlesDawley
Occasional Contributor
Is there any way to hide a widget from the screen but still have it active? I would like to have a georss widget open but not have the widget window visible.
Tags (2)
0 Kudos
13 Replies
sreeharikottoormadam
New Contributor III
Frank,

add this to the HeaderControllerWidget.mxml


private function getWidgetItems(widgetList:Array):ArrayCollection
{

---------
if (widgetList.label=="My Widget"){
//do nothing
}
else {
menuItems.addItem(widgetItem);
}

----------

}
0 Kudos
FrankRoberts
Occasional Contributor III
Thanks guys!  I will give that a shot.
0 Kudos
MarkHanway1
New Contributor
Thank you sreeharikm....
What if you would like to have multiple widgets excluded?  Thank you, Mark
0 Kudos
MarkHanway1
New Contributor
pretty simple...I filtered multiple widgets by adding

private function getWidgetItems(widgetList:Array):ArrayCollection
{

---------
if (widgetList.label=="My Widget" || widgetList.label=="My Widget2" || widgetList=="My Widget3"){
//do nothing
}
else {
menuItems.addItem(widgetItem);
}
0 Kudos