questdlg() functions does not dsiplay default buttons or user defined buttons

1 次查看(过去 30 天)
7-9-2019 11-24-47 AM.png
which questdlg
>> C:\Program Files\MATLAB\R2018b\toolbox\matlab\uitools\questdlg.p
I tried using the questdlg.m files by temporarily removing .p files and it still didn't work. Looks like for some reason questdlg.p files keeps getting corrupted. I am not able to create new .p files using pcode function.
When I copy the questdlg.p file from the same version matlab from another system it works for sometime and again start getting the dialog box without any buttons.
  2 个评论
Guillaume
Guillaume 2019-7-9
You should never mess with any file in C:\Program Files (be it matlab or otherwise), it's a sure way to irreversibly corrupt programs. At this point, I would recommend reinstalling matlab rather than copying files from another system.
You should show us the code you used to generate the dialog.
Deependra Mishra
Deependra Mishra 2019-7-9
questdlg('Would you like a dessert?', ...
'Dessert Menu', ...
'Ice cream','Cake','No thank you','No thank you');
I used the code from the documentation example. I tried messing with files in C:\Program Files only after I was having issue with multiple system. I have tried this both on mac and windows pc. I am not getting the default buttons. I messed the files in windows PC which has Matlab R2018b. When I said I copied the file from other system. I copied the questdlg.p file from another windows machine which has MAtlab R2018b.
In mac, i have MATLAB R2019a installed, haven't messed with any files and still when executing above code I have the same issue. The output of
which questdlg
in mac is as follows:
/Applications/MATLAB_R2019a.app/toolbox/matlab/uitools/questdlg.p

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dialog Boxes 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by