Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The standard menu control can be used to control parameters offering a list of options, for example, the oscillator type of a synth oscillator. Allthough the menu control is a fast way to implement selection menus, its disadvantge is that it cannot be customized in its appearance and always uses the look of the operating system menus. If you want to implement a menu that follows the look and design language of your instrument, you can create menu templates that can be openend via a switch using the popup style.

This how-to demonstrates how to build a custom popup menu for the ocillator type of a synth oscillator.

Info

The menu in the example below shows all oscillator types in a long list. If you want to create a menu with mutiple levels, please refer to Custom Multi Level Menus.



Panel

On this page:

Table of Contents
maxLevel23
indent25px
exclude\d|Kom

Related pages:


Prerequisites

  • A program with a synth zone and a macro page.
  • A group with a switch, a text and an image control
  • A Simple Menu template for the popup menu
  • A SimpleMenuEntry template for creating the entries of the popup menu

How the Elements Interact

The Custom Popup group contains the elements Menu Switch, Menu Value and Menu Back.

Menu Switch is a switch control that is configured to open the popup menu. It uses the Popup style with the Simple Menu template which contains a Template List that uses the SimpleMenuEntry template for displaying the available options. Menu Value is a text control for displaying the current value and Menu Back is an image control for the background picture.

This is how it looks on the macro page if the pop-up menu is opened:

Custom Popup

This group contains the elements that are needed to open the pop-up menu and to display the selected value.

Menu Switch

This switch control is used to open the Simple Menu template as a pop-up. Since it is combined with a background image and a text, the switch itself does not require any graphics. To open the pop-up menu, the properties of the switch must be set to the following values:

PropertyValues
Modepush
StylePopup
TemplateSimple Menu
Close on ClickInside, Outside
PlacementPlace Left, Place Right, Place Below

Menu Value

This text control is connected to the oscillator type parameter and displays the selected type.

Menu Back

This image control displays a background picture, which is simply a black panel.

Simple Menu

This template contains a template list view that uses the SimpleMenuEntry template to create the entries of the pop-up menu.

The Value is connected to the oscillator type for switching the types. To create the entries for the available types, the template parameter MenuText must be connected to the oscillator type. The look of the entries is defined in the SimpleMenuEntry template.

SimpleMenuEntry

This template represents one entry in the pop-up menu and is instanciated for each oscillator type.

Text

This text control displays the text of an entry. The control is set to Read-only so that the text cannot be edited. The Value property is exported and named to MenuText on the template level. The entries in the pop-up are created by connecting the exported parameter in the template list view to the oscillator type.

Switch

This switch control provides the hover image when moving the mouse over an entry.

Image

This image control displays the gray background panel for an entry.

 

Info

Pop-up menus can only be displayed within the dimensions of the macro page. If a pop-up menu is too large, it will be clipped. To remedy this, you can either change the direction in which the pop-up menu opens, for example, open it to the top instead of to the bottom, or you can change the size of the Simple Menu template, so that it fits, and then activate the scrollbar to be able to scroll the available entries.

Example VST Preset