Effacer les filtres
Effacer les filtres

Using 'default' as default answer in inputdlg.

3 vues (au cours des 30 derniers jours)
Adam Hicks
Adam Hicks le 20 Nov 2017
I'm using an inputdlg prompt for user input and one of the options for another program I'm using is an input of the string 'default'. As such, I'd like one of my default answers for the user in the inputdlg to be the string 'default'. However, when I use 'default' as a default answer, inputdlg uses an empty string instead (I assume this is a keyword). Is there a way to ignore this so that 'default' may be used?
Example:
defans = {str,date,'default','',''};
output = inputdlg(prompt,dlg_title,num_lines,defans);

Réponses (1)

Star Strider
Star Strider le 20 Nov 2017
Using 'default' (with a lower-case ‘d’) appears to be prohibited. When I experimented with it, 'Default' and 'DEFAULT' displayed as expected.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by