Show / Hide Table of Contents

Method popupMenu.showSimple


Overload

Creates and shows a simple popup menu. Without images, actions, submenus. Returns item id or 0.

public static int showSimple(Strings items, PMFlags flags = 0, POINT? xy = null, RECT? excludeRect = null, AnyWnd owner = default)
Parameters
items  (Strings)

Menu items, like "One|Two|Three" or new("One", "Two", "Three") or string array or List. Item id can be optionally specified like "1 One|2 Two|3 Three". If missing, uses id of previous non-separator item + 1. Example: "One|Two|100 Three Four" (1|2|100|101). For separators use null or empty strings: "One|Two||Three|Four".

flags  (PMFlags)
xy  (POINT?)

Menu position in screen. If null (default), uses mouse position by default. It depends on flags.

excludeRect  (RECT?)

The menu should not overlap this rectangle in screen.

owner  (AnyWnd)

Owner window. The menu will be automatically closed when destroying its owner window.

Returns
int

id of the selected item when closed, or 0 if canceled.

Remarks

The function adds menu items and calls popupMenu.Show. Returns when menu closed. All parameters except items are same as of Show.

See Also

dialog.showList