tsc_FieldContextMenu

A class representing the contents of a field control context-sensitve menu.

An instance of this class is typically passed to the field hosting the menu by the OnContextMenuRequested event.  It provides access to the menu contents and the ability to modify those contents.

Methods

int Count () const;

How many items are currently on the menu.

tsc_FieldContextMenuItem Query (int index) const;

Retrieves the properties of an item at the index, a default struct is returned if there is no item at that index.

bool Append (const tsc_FieldContextMenuItem& newItem);

Add a new item, returns true if the item was valid and appended successfully.

Please note that there is a maximum menu item limit of 20 items.

bool Replace(int index, const tsc_FieldContextMenuItem& newItem);

Update an item, returns true if the item was valid, found and succesfully replaced.

bool Insert (int index, const tsc_FieldContextMenuItem& newItem);

Inserts an item, returns true if the item was valid an inserted successfully.

bool Delete (x_Code identifier);

Removes an item, returns true if at least one instnace of the itme was found and removed.

void Clear ();

Removes all items.