Menu Not Enabled at run time

Some of my menus are enabled at run time and some are not.
However in the IDE they are all set as enabled.
Why? What should I do to enable it in the windows Open Event?


I put these in my window open even yet they have no effect.

FileOpen.Enabled = true
FileSave.Enabled = false

The logic being that you shouldn’t be able to save until FileOpen has been called.
However as I said I’ve done all this prep in the IDE and I’ve also done it in the window open even yet the states are actually reversed.

Ahh… in the EnableMenuItems event NOT open!!!


FYI — If you have autoenabled checked on the menuitem, the framework will enable things based on whether you have implemented the menu handler on a window or on the control that has focus.

whoa! Wait a minute… So are you saying i have to implement the EnableMenuItems on all my controls?

you have to implement it somewhere
where you implement it depends on what you want to handle the menu selection

for instance, in the IDE the copy paste is handled in several places depending on what has focus
but the “new project” menu item is always handled by the IDE application
that way this command works as long as the app is running whether or not you have any projects open

Of course… that makes sense.

Do you have the proper menu handlers for FileOpen and FileSave ?