Add a methode to a popupMenu

how can I add a method to a popup menu ?

found it

Drag a class from the IDE and make it’s Super PopupMenu and name it. You can add methods, properties, etc directly to the class. Then when you are ready instantiate it onto a window/container.