Messages - example
// In the sender widget use this code from the button click to close all widgets
function button1OnClick(Sender)
{
msg("close","receiver");
// add extra lines replacing "receiver" with the name of the widgets you wish to close
}
// In the widget you wish to close add this code
function widgetOnMsg(MsgString)
{
if(MsgString=="close")
widget.close
}
Dont forget in the widget you wish to close to set the function
OnMsg = widgetOnMsg
so the code runs when a message is received
Topic here
http://bbs.xwidget.com/viewtopic.php?f=8&t=3621