Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Action
Collapse the table of content
Expand the table of content

System.Gadget.Settings.ClosingEvent.Action property

[The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]

Contains a value from the enumeration of closing actions for the Settings dialog.

This property is read-only.

Syntax


objAction = System.Gadget.Settings.ClosingEvent.Action


Property value

An Object that receives the closing action.

(commit)

Ok button invoked.

(cancel)

Cancel button invoked.

Remarks

Used in the Settings dialog box callbacks (onSettingsClosing and onSettingsClosed).

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 [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

End of client support

Windows 7

End of server support

Windows Server 2008

IDL

Sidebar.idl

DLL

Sidebar.Exe (version 1.00 or later)

See also

System.Gadget.Settings.ClosingEvent
Reference
onSettingsClosing
onSettingsClosed
cancel
cancellable
closeAction

 

 

Community Additions

ADD
Show:
© 2015 Microsoft