Documentation

Menus

When you right-click the mouse on the server output window, a context menu is displayed. Normally this popup menu just allows you to edit the properties of the window. However, you can also add your own items to this context menu using Menu objects.

Menu objects are defined using the #MENU command. For example:

#MENU edit {edit %selword}

will add an item called "edit" to the popup menu. The %selword function returns the current word under the mouse cursor. So, if you right click the mouse on the word "readme.txt" and then select the "edit" item from the popup menu, the "edit readme.txt" command will be sent to the server.

A menu caption of "-" (without the quotes) can be used to create a separator line between other menu items.

You can also define menu items using the Edit Menus screen of the Package Editor.

Using the Package Editor, you can nest menu items to form submenus. You can also place menu items into a Class folder, and then use this class folder as a submenu.

Add comment

Login or register to post comments