The PopupMenu> command is handy, here's what we have now...
Besides using the mouse, the user can hit the Down arrow key to select the first menu item, again for the second and so on... and then hit the Enter key to register their choice.Existing Command wrote:PopupMenu>X,Y,ItemList,result
Creates and displays a simple pop up menu at the specified X,Y position and returns the index of the item selected by the user.
X and Y take a screen X,Y position
ItemList is a semi-colon delimited list of captions
result is the return value and will contain the zero based index of the item the user selected
Sometimes I'd like to pre-select the default because in certain situations it is highly predictable what choice they will make however I have no way to do that.
Now if someone can MacGyver up a way to accomplish this, that would be fantastic and appreciated... however I propose the simple addition of an optional default parameter as shown below...
If anyone else would find this useful, please chime right in...Proposed enhancement wrote:PopupMenu>X,Y,ItemList,result[,default]
Creates and displays a simple pop up menu at the specified X,Y position and returns the index of the item selected by the user.
X and Y take a screen X,Y position
ItemList is a semi-colon delimited list of captions
result is the return value and will contain the zero based index of the item the user selected
default is an optional parameter and allows you to pre-select one of the menu items via it's zero based index
![Smile :)](./images/smilies/icon_smile.gif)