Contents



Going Beyond the Basics (cont'd) 

Next
 

Popup Menus

Popup menus are a great way to present a list of items for selection. They're familiar, easy to use, and take virtually no space when not being used. The DH_PopupMenu module offers a variety of popup menu options.

 

 



You can connect it anywhere you need a List Entry type control, through a Patch Mem - List2 in the same way as a Dropdown List.
 

A menu can be displayed in multi-column format, with or without column separators, by choosing these options in the module's Properties, as shown on the right.

 

 

 

 

By teaming up DH_PopupMenu with DH_TextList, you can add horizontal line breaks, non-selectable headings, and column breaks at arbitrary intervals.

This is achieved by using a few special formatting characters in the list file you create for DH_TextList.

The following are recognized as formatting characters if they are the 1st character in an item:

--- ; (one or more hyphens, followed by a semicolon to end the line) inserts a horizontal separator.

~ (tilde) at the beginning of an item marks it as non-selectable for category headings and the like.

| (vertical bar) at the beginning of an item forces a column break with a vertical bar separator.

] (right square bracket) at the beginning of an item forces a column break without a vertical bar separator.

 The list file used to create the above menu can be viewed here.

A final note: the code that interprets the formatting characters is in the DH_PopupMenu module. Therefore, you must use its "Selection" pin, not the DH_TextList's Text I/O pin, to get the correct text for the selected item if you use formatting characters. The Index pins on both modules will still give identical results in any case.

top

Next