menuitem event(s) code area

Hi
I am trying to add code for menuitem but I just can’t find where to access the event code area !
for all other ide objetcs theres “go to pushbutton code” for example, but not for the menuitems

so where do i go? thanks
regards

If you are referring to the main app menu then you have to add a Menu Handler for each menuitem.

everything is greyed out execpt for build step and database…
??

One way doing this:
In the left pane (contents) select the App, then click on the ‘Insert’ toolbar icon and select the Menu Handler (just below Event Handler).

There is nothing I can add !! everything is greyed out. I can only add build step and database but then again these have all the options greyed and anyways i dont need them.

Please refrain from posting several times the same issue. It does not speed up replies and only confuses discussions. I just saw your second thread but will reply here.

In the menu editor you remove elements with the backspace, or delete key (depending Mac or Windows).

  • To add code, note the name of the menu item in the inspector you see when it is selected.
  • Right click on the window in the left pane, and select add/Menu Handler
  • In “MenuItem name”, enter the exact name you have used in the menu editor.

Now you can enter the code corresponding to that menuItem.

Code is separate from the MainMenuBar because you can have different menu bars, and you can have different handlers in different windows. App menu handlers are good for the whole application, unless there is a window specific menu handler.

If you find that complicated, stick to the method I offered, you will be fine.

the problem is that i cant add the menu handler because the option is not available is greyed
I also can’t delete or cut menus I created, clicking “delete” doesnt have any effect at all

Please see if this and this and other posts in the same discussion are of any help,

[quote=105764:@Horacio Vilches]the problem is that i cant add the menu handler because the option is not available is greyed
[/quote]
You probably are trying to add a menu handler to a menubar - this is not how it works! A menu handler is added to App, a Window, a ContainerControl or any RectControl subclass (TextField, Listbox, etc.).

Read the introduction in “Book 2: User Interface” on Main Page, page 103.