radio button prompt

조회 수: 13 (최근 30일)
William
William 2012년 3월 19일
Is there a way to create an input prompt that instead of a string input has a radio button?
  댓글 수: 1
Jan
Jan 2012년 3월 19일
I cannot imagine what you are looking for. An input prompt is thought for strings in opposite for radio buttons, which are thought for mutual exclusive choices. Therefore "radio button prompt" is a contradiction.
Can you post a drawing of what you want to get?

댓글을 달려면 로그인하십시오.

채택된 답변

Jacob Halbrooks
Jacob Halbrooks 2012년 3월 19일
Radio buttons are typically used when there is a set of mutually exclusive options to choose from. For this use case, MATLAB provides QUESTDLG:
help questdlg
This dialog uses push buttons and closes when an option is selected.
If you want to pursue radio buttons, you might browse the File Exchange for the user-contributed input dialog utilities there, or you could develop your own using UICONTROL for a radio button:
function createRadioDialog
dlg = dialog('Position',[200 200 30 30]);
uicontrol('Parent',dlg,'Style','text','String', 'Select?','Units','norm','Position',[0 0 0.5 0.7]);
uicontrol('Parent',dlg,'Style','radio','Units','norm','Position',[0.5 0 0.5 1]);

추가 답변 (1개)

Image Analyst
Image Analyst 2012년 3월 19일
The menu() function might also be an option you want to look into. For example:
choice = menu('Choose a color','Red','Blue','Green')

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by