How to enable sub menus

I am using a Menu bar.
i have also used a Menu Handler on Window.
i can click main menus using menu handler but sub menus are disabled. i am not getting how to enable them.

e.g i have a File menu without any sub menu. then it works.
If i adds a sub menu under File > Exit.
Exit Menu is disabled on running app.

Can anyone help to enable sub menus ?

What for a SubMenu there ? Try something different like Open → SubMenu (txt, csv, html, etc.)

Did you noticed the window Enabled Event ?

I imagine that you know that if you do not create the Menu Handler for this submenu, it will be disabled.
Main menu items are always enabled, but they don’t run any code if they have submenus.

Also, if you are talking about a indow you add, you have to set a MenuBar to it :frowning:

[quote=483828:@Ramon SASTRE]I imagine that you know that if you do not create the Menu Handler for this submenu, it will be disabled.
Main menu items are always enabled, but they don’t run any code if they have submenus.[/quote]
I have used Menu handler for sub menus but its not working
if i write code for main menu then it works for it but same is not happening for sub menus.

I have noticed a EnableMenuItems event of a window but don’t know what code should i write in that event.

maybe you had renamed it? the menu handler is not changed then.

In EnableMenuItems:

FileQuit.Enabled = True

Don’t you forget something ?

For some unknow reason, I do not found the page below earlier today:
http://documentation.xojo.com/api/deprecated/menuitem.html#menuitem-enabled