Can I create a questdlg box with multiple yes/no options in the same box?
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
choice = questdlg('Living Room outlet', ...
'', ...
'On','Off','Off');
switch choice
case 'On'
disp(' Outlet is on.')
outlet = 1;
case 'Off'
disp(' Outlet is off.')
outlet = 2;
end
Right now, of course 2 options show up in the box, however I want the user to be able to select multiple 'on ' 'off' options within the same dlg box. For example:
Living Room: On Off
Master room: On Off
Bedroom: On Off
All of that in the same dlg box and still be able to implement other actions based on the users input.
0 comentarios
Respuestas (2)
Image Analyst
el 24 de Abr. de 2016
You might want to setup a GUI with three static text labels and 3 pairs of radio buttons. Put the radio button pairs in a group panel, one panel per pair, so they will turn each other off when selected.
0 comentarios
Jakob Sievers
el 4 de Abr. de 2019
This is an old question but I was wondering if anyone know of any solution to this question? If not I'll sit down and code it myself but I figured that I'd ask if it's been done (I haven't been able to find it yet) so as to not spend too much time on this.
What I need is not just more buttons than the current questdlg allows but essentially a number of on/off buttons which can be set as desired and then an ok and a cancel button at the bottom. Maybe someone knows of a solution to this problem?
Thanks in advance
2 comentarios
Jakob Sievers
el 5 de Abr. de 2019
The mathworks page for menu() suggested to use listdlg instead so I had a look and that has the functionality that I was looking for so thanks for guiding me in the right direction :-)
Ver también
Categorías
Más información sobre Dialog Boxes en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!