StaticMenuItemControl.setEnabled

Sets whether or not the menu item can be clicked by the user.

Further documentation.

Parameters

boolean  enabled,