Difference between revisions of "DesktopQuitMenuItem"

From Xojo Documentation

(Created page with "N/A")
 
 
Line 1: Line 1:
N/A
+
{{ClassBox
 +
| super=[[DesktopMenuItem]]
 +
| platform=all
 +
| scope=global
 +
| newinversion=2021r3
 +
}}
 +
{{Description
 +
|text = The Quit menu item is derived from the '''DesktopQuitMenuItem''' class. }}
 +
 
 +
==Notes==
 +
The Quit menu item that is added by default to all applications is an instance of the '''DesktopQuitMenuItem''' class. It differs from menu items derived from the [[DesktopMenuItem]] 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 DesktopQuitMenuItem are moved to the Application menu for you automatically.  This prevents multiple DesktopQuitMenuItem entries from appearing in menus (only the first usage appears).
 +
 
 +
==See Also==
 +
[[New]] operator, [[DesktopMenuItem]], [[DesktopPreferencesMenuItem]], [[DesktopApplicationMenuItem]] classes.
 +
 
 +
[[Category:Desktop]]

Latest revision as of 19:17, 23 July 2021

Class (inherits from DesktopMenuItem)


New in 2021r3

The Quit menu item is derived from the DesktopQuitMenuItem class.

Notes

The Quit menu item that is added by default to all applications is an instance of the DesktopQuitMenuItem class. It differs from menu items derived from the DesktopMenuItem 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 DesktopQuitMenuItem are moved to the Application menu for you automatically. This prevents multiple DesktopQuitMenuItem entries from appearing in menus (only the first usage appears).

See Also

New operator, DesktopMenuItem, DesktopPreferencesMenuItem, DesktopApplicationMenuItem classes.