Button/Menu like Xojo IDE 'Insert' button

How do you create a button similar to the IDE’s “Insert” button in the top left corner? Specifically, we want a drop down menu with sub levels.

BevelButton

MouseDown

Dim popMenu As MenuItem
popMenu = EditMenu.Clone

Dim selectedMenu As MenuItem
selectedMenu = popMenu.Popup

A combination of MenuItem and Menuitem.Popup as Axel shows a snippet above. Let us know if you want more pointed examples as I have been using this technique alot lately. :slight_smile:

http://documentation.xojo.com/index.php/MenuItem

Canvas + implement the mouse down event that pops up a menu