Blitz3D+ Command Reference

MenuText$ ( menu )

Parameters

menu - menu item handle

Description

Returns the text of a menu item.

Requires Extended language mode.

The result is the label exactly as it was given to CreateMenu or SetMenuText, including any & accelerator marker (so a menu created as "&Save" comes back as "&Save"). Separator entries, which are created with an empty label, return an empty string.

Handy when one handler manages a group of items - a recent-files list, for example, can read the clicked item's text instead of keeping a parallel array. Like all GUI text, the string crosses over as UTF-8.

See also: SetMenuText, CreateMenu, MenuChecked, MenuEnabled.

Index