System.Gadget.Settings.ClosingEvent.closeAction Property
Gets the Settings dialog close request.
This property is read-only.
Syntax
propVal = System.Gadget.Settings.ClosingEvent.closeAction()
Parameters
actCloseAction [out]
Action that specifies the type of close request.Value Meaning commit OK button is invoked. All modified settings are confirmed and stored.
cancel Cancel invoked. All modified settings are discarded.
Examples
The following example demonstrates how to store a Settings value when the Settings dialog closes.
// --------------------------------------------------------------------
// Handle the Settings dialog closing event.
// Parameters:
// event - System.Gadget.Settings.ClosingEvent argument.
// --------------------------------------------------------------------
function SettingsClosing(event)
{
// User hit OK on the settings page.
if (event.closeAction == event.Action.commit)
{
System.Gadget.Settings.writeString(
"settingsUserEntry", "OK");
}
// User hit Cancel on the settings page.
else if (event.closeAction == event.Action.cancel)
{
System.Gadget.Settings.writeString(
"settingsUserEntry", "CANCEL");
}
// Allow the Settings dialog to close.
event.cancel = false;
}
Requirements
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
IDL | Sidebar.idl |
DLL | Sidebar.Exe version 1.00 or later |
See Also
System.Gadget.Settings.ClosingEvent
Send comments about this topic to Microsoft
Build date: 2/24/2010
Build type: SDK