Menu Item Enable

I like to switch the enable status of a Menubar Item.
I have write it into a Event Handler “TextChanged” of a Textfield by:


By running, is always the Error “This method canot acept an assigned value (its lacks an Assings parameter)

Wath did a wrong?


Enabeld is accepted but it doesn’t works.?

AutoEnable needs to be off.

Nothing is happend.
Not with AutoEnable off or on.
The same by viseble.

Do you have a menu handler attached? Just defining the text for a menu won’t make it active unless it has something to respond to

I don’t understand it, do you have a example?

When you click on the menu item… what are you expecting to happen?
You have to add an event to it, otherwise it has nothing to do, if it has nothing to do, it will never become enabled.

  • add your menu item to the menu
  • click on the WINDOW that the menu is attached to
  • add some code

If OrderTextFiel.Text ="" then, the Item “Save” in the MeunuBar “File” should be not Enabled or not Viseble.
In oder case, OrderTextFiel.Text <>"", the Item “Save” should be viseble or Enabled.

Great… .now DO YOU or DO YOU not have a MENU HANDLER?
Have you or have you not read the LR about how to properly construct menus?

Hate to sound snippy, but we are both repeating ourselves, and getting no place.

You are indicating the condition that you wish to have it enabled or disabled,
I am asking if there is CONTENT to be enabled… if not, then nothing you can or will do will cause the menu item to be enabled

It must have ENABLED=true AND have a MENUHANDLER assigned

Also refer to Desktop Menus in the User Guide.

I have a MainMenuBar with the item “File” and the SubItem “Save”, also i have a Menu Handler with the Item “FileSave”.
In the Menu Handler “FileSave”, i have write the Code for preparing the Save order.
But i like it, to have only the possibility to save, if the OrderTextFiel.Text <>""
Thats means the Menu Item “Save” shuold be enabled or not.

FileSave.Enabled=(OrderTextFiel.Text <>"")