Search Locate Previous Next Contents

Win.Popup – simple popup menu

To generate a simple right-mouse menu at the current mouse position:

Win.Popup 'One' 'Two' '' 'Lots'

Null entries make separators in the menu. This returns 0 if the user cancels, or the index of the menu item otherwise. You can grey out items, or check selected items by using the tilde and hash characters to begin the string:

Win.Popup 'One' '~Two' '#Three' '' 'Last'

Note that selecting ‘Last’ here will return 5 – the disabled and separator items are counted in the result. To use the radio button style (only one item may be selected for any menu group):

Win.Popup 'One' '' '±This' 'That' '' 'Last'


Continue to: Win.PopupTree – deep menu
© Copyright Causeway Graphical Systems Ltd 2001