# Menubar Checkbox or Radio Button

**URL:** <https://forum.inductiveautomation.com/t/menubar-checkbox-or-radio-button/50256>\
**Category:** Ignition\
**Created:** [August 25, 2021, 2:39am UTC](https://forum.inductiveautomation.com/t/menubar-checkbox-or-radio-button/50256 "2021-08-25T02:39:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 25, 2021, 2:17pm UTC](https://forum.inductiveautomation.com/t/menubar-checkbox-or-radio-button/50256/2 "2021-08-25T14:17:14Z")

</div>

This is not possible through the client events menubar script directly.  
With some hacking at runtime, you could 'inject' your own [`JRadioButtonMenuItem`](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/swing/JRadioButtonMenuItem.html) or [`JCheckboxMenuItem`](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/swing/JCheckBoxMenuItem.html).  
Accessing the runtime client's menubar will be somewhat tricky; this post gets you some of the way there:

> [@Project Properties via code](https://forum.inductiveautomation.com/t/project-properties-via-code/31991/2):
>
> This isn’t directly possible - you can theoretically retrieve project properties in the runtime, but modifying them wouldn’t actually do anything to your running client. If you just need to toggle the menu bars, then that’s the approach to take. Theoeretically, something like this might work: from javax.swing import SwingUtilities from com.inductiveautomation.factorypmi.application import FPMIApp fpmiapp = SwingUtilities.getAncestorOfClass(FPMIApp, \<some component reference\>) if fpmiapp is no…

Actually creating the menu items you want to add is somewhat tricky; your best reference is probably the Jython manual: [Chapter 16: GUI Applications — Definitive Guide to Jython latest documentation](https://jython.readthedocs.io/en/latest/GUIApplications/)

---

_[View the full topic](https://forum.inductiveautomation.com/t/menubar-checkbox-or-radio-button/50256)._
