Found a potential bug in 'listdlg'?

6 visualizaciones (últimos 30 días)
Ziv Kassner
Ziv Kassner el 27 de Mzo. de 2020
Comentada: Ziv Kassner el 28 de Mzo. de 2020
When typing the following code:
[w,~] = listdlg('PromptString',{strcat(['Select a wing for ' ,...
'individual number ',num2str(indx)])},...
'SelectionMode','single','ListString',fn);
It doesn't show the words after 'individual'
I wonder why...
Thanks,
Ziv

Respuesta aceptada

Cris LaPierre
Cris LaPierre el 28 de Mzo. de 2020
Editada: Cris LaPierre el 28 de Mzo. de 2020
It wouldn't be a bug since this behavior is documented in the doc.
"If you specify the prompt as a character vector that is longer than the width of the dialog box, the prompt clips. To create a multiline list box prompt, specify the prompt as a cell array or string array. Line breaks occur between each array element. Long elements wrap to fit the dialog box."
Your prompt string is longer than the width of the box. You could try the following.
[w,~] = listdlg('PromptString',["Select a wing for ",...
"individual number " + num2str(indx)],...
'SelectionMode','single','ListString',"Happy");
  1 comentario
Ziv Kassner
Ziv Kassner el 28 de Mzo. de 2020
thank you so much,
worked very well.
Ziv

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Discrete Events and Mode Charts en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by