POPUPBUTTON

Definition

POPUPBUTTON [id]
{
  [Flags]

  CHILDS
  {
    [Child 1]
    [Child 2]
    ...
  }
}

Description

Popup buttons work like COMBOBOX in that they let the user choose among several items in a popup menu, but they do not track the active item in any way.
The popup menu items are listed within the CHILDS group (note the spelling!). Each child should be formatted like this:

id, stringidentifier;

Where id is either a number or an enum from c4d_symbols.h, stringidentifier is an identifier from the string resource file that belongs to the dialog.
Use GeDialog::SetInt32() and GeDialog::GetInt32() to access the current selection.

Note
It is also possible to use GeDialog::SetPopup() to load the menu items from a container.
Then it is possible to have hierarchical menus. In that case there is no need for children in the resource file.

Flags

See Dialog Resource for a description of the common flags.

[LAYOUTFLAGS]Layout flags.
[SIZE]Manual size.

Example

POPUPBUTTON IDC_POPUP
{
  CHILDS
  {
    FIRST_CHILD_ID, FIRST_CHILD_TEXT;
    SECOND_CHILD_ID, SECOND_CHILD_TEXT;
    THIRD_CHILD_ID, THIRD_CHILD_TEXT;
  }
}

Further Reading