Difference between revisions of "QuitMenuItem"

From Xojo Documentation

(See Also)
 
Line 1: Line 1:
 +
{{DeprecatedItem|version=2021r3|replacement=[[DesktopQuitMenuItem]]}}
 
{{ClassBox
 
{{ClassBox
 
| super=[[MenuItem]]
 
| super=[[MenuItem]]

Latest revision as of 20:49, 13 September 2021

Class (inherits from MenuItem)

The Quit menu item is derived from the QuitMenuItem class.

Notes

The Quit menu item that is added by default to all applications is an instance of the QuitMenuItem class. It differs from menu items derived from the MenuItem class in that it is enabled by default and automatically calls the Quit method to quit the application. Thus, there is no need to enable the menu item via code or write its handler.

On macOS, instances of QuitMenuItem are moved to the Application menu for you automatically. This prevents multiple QuitMenuItem entries from appearing in menus (only the first usage appears).

See Also

EnableMenuItems function; New operator; MenuItem, PrefsMenuItem, ApplicationMenuItem classes.