<div class="meta" robots="noindex">

</div>

Method

# EnableMenuItems

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `DesktopWindow.MenuBarSelected<desktopwindow.menubarselected>` as a replacement.

</div>

## Description

Forces an update of the menu bar and executes the <span class="title-ref">EnableMenuItems</span> event handler.

## Usage

**EnableMenuItems**

## Notes

In most cases, the standard menu bar updating will be sufficient. There are cases, however, when it's not. For example, if the SelChange event handler of a `TextField</api/deprecated/textfield>` control causes all of the menu items in a particular menu to be disabled, the menu itself should be disabled. Unfortunately, it won't be because the user has not yet clicked in the menu bar. Under circumstances like this, you can call the <span class="title-ref">EnableMenuItems</span> method to force your app to only update the menus based on your own conditions.

## Sample code

``` xojo
EnableMenuItems
```

## Compatibility

All project types on all supported operating systems.

## See also

`MenuItem</api/deprecated/menuitem>` class.
