Mastering the Wimp (Part 11 - Menus cont'd)
by Lee Calcraft

This month's version of the example program demonstrates how to find out which item has been selected from a menu tree, as well as how to implement menu dialogue boxes.

Once the program has been run, clicking Menu over the icon bar icon displays a menu with three options: Info, Options and Quit. The Info option leads to a dialogue box similar to the standard 'About this program' dialogue box. The Options option leads to a submenu containing four entries named First, Second, Third and Fourth. Finally, the Quit option terminates the program.

Choosing any menu option will result in details of the selection being printed in the top left-hand corner of the screen. The top line is the number of the entry in the top level menu, while the bottom line is the number of the entry in the submenu, or 'No sub-menu' if the item chosen was in the top level menu.
