# Add handler to menu item

**URL:** <https://ifnotnil.com/t/add-handler-to-menu-item/3290>\
**Category:** Other\
**Created:** [25 May 2023 16:35 UTC](https://ifnotnil.com/t/add-handler-to-menu-item/3290 "2023-05-25T16:35:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [25 May 2023 16:35 UTC](https://ifnotnil.com/t/add-handler-to-menu-item/3290/1 "2023-05-25T16:35:36Z")

</div>

> **[Confued as to how to add handler to MenuItem](https://forum.xojo.com/t/confued-as-to-how-to-add-handler-to-menuitem/75890)**
>
> Hello, trying to populate a menu with devices which I have done, but how do I then assign the method to run for each one in my code (which is in the EnableMenuItems event)? I would want the m.tag to be passed to the method. Or am I approaching...

[Sample project](https://great-white-software.com/miscellaneous/addhandlertomenuitem.xojo_binary_project.zip)

MenuItem handlers are JUST events like any other

---

_[View the full topic](https://ifnotnil.com/t/add-handler-to-menu-item/3290)._
