Extensions Reference

Extensions Reference > exDialogs


dlgListPromptGetSelString

string dlgListPromptGetSelString();

 

Returns the text of the selected item in a list selection dialog

The DLGLISTPROMPTGETSELSTRING function returns the text string selected by the user in the dialog previously shown by dlgListPrompt. This function must only be called after dlgListPrompt has been successfully called and closed using the OK button.

If the items in the list prompt dialog are taken from an array it may be more appropriate to get the index of the selected item using dlgListPromptGetSelItem.

 

Parameters

None

 
 

Return Value

The text string selected by the user.

 

Example Code

// Reset the list before use
dlgListPromptReset();

// Add some items for selection
dlgListPromptAddItem("list item 1");
dlgListPromptAddItem("list item 2");

// Open the prompt dialog with the specified options
if(dlgTextPrompt("The Title", "The Frame", Select an item ",
                 -1, -1, True) == True)
{
    // Retrieve the text of the selected item
    string SelText = dlgListPromptGetSelString();
}