Toggle Menu

Hi there,

For a desktop application (osx) I made a menu in the MainMenuBar. Along with the Menu Handlers everything works perfect.

I would like to make a toggle menu item. Choosing this menu item should turn a value on or of and this should be visible in the menu. How can i make that?

You would just change the .text property of that specific menuItem. For example, if you had a menuItem named windowsShowWindow, you could in the handler for that menu write:

if windowsShowWindow.text = "Show Window" then windowsShowWindow.text = "Hide Window" else windowsShowWindow.text = "Show Window" end if

This will change the text the user sees each time the user chooses the menu item.

Well, that was simple enough. Thanks.