Graphical User Interface(11/60) Uicontrol Objects Radio button ○Radio Button A radio button acts as an option to be chosen by the user.The user clicks on the button the make the choice. Usually two or more radio buttons are linked together as a group.They are linked in the sense that only one of the buttons will be in its selected state. >>K=get(hObject,'value); value'will be equal to 1 if the user selects the radio button Otherwise it will be 0. 同濟大学 AW TONGJI UNIVERSITY
➢ Radio button A radio button acts as an option to be chosen by the user. The user clicks on the button the make the choice. Usually two or more radio buttons are linked together as a group. They are linked in the sense that only one of the buttons will be in its selected state. >>K=get(hObject,'value'); Graphical User Interface(11/60) Uicontrol Objects ‘value’ will be equal to 1 if the user selects the radio button. Otherwise it will be 0
Graphical User Interface(12/60) Uicontrol Objects > Check Box ☐Check Box Identical to the Radiobutton,except in a different form. Useful for representing two states of an option that you may want to provide (usually as on and off). >>K-get(hObject,'value); value'will be equal to 1 if the user selects the checkbox. Otherwise it will be 0. @月大学 TONGJI UNIVERSITY
➢ Check Box Identical to the Radiobutton, except in a different form. Useful for representing two states of an option that you may want to provide (usually as on and off). >>K=get(hObject,'value'); Graphical User Interface(12/60) Uicontrol Objects ‘value’ will be equal to 1 if the user selects the checkbox. Otherwise it will be 0
Graphical User Interface(13/60) Uicontrol Objects >Pop-up menu Option 1 Option 1 Option 2 Option 3 Option 4 A pop-up menu,when clicked,displays a list of options for the user to choose from. Used in situations where multiple choices need to be available to the user. @日济大学 AW TONGJI UNIVERSITY
➢ Pop-up menu A pop-up menu, when clicked, displays a list of options for the user to choose from. Used in situations where multiple choices need to be available to the user. Graphical User Interface(13/60) Uicontrol Objects
Graphical User Interface(14/60) Uicontrol Objects To generate the list of options for the user: 空roperly npecor 口回图 uicontrol (popupmenu1 "Option 1') FontName Ns Sans Ser Press this button in FoniSie 8.0 the 'String'field FontweigHt normal on HRTest iterruptible on KeyPreseFcn 10 1.0 m 00 And this window 2824763193153 Selectior-gh on 00m0 will appear String 国Option1 Style popupmenu TootipString UIConteMenu <None> 日0x0 douly明 1101 @月停大学 TONGJI UNIVERSITY
To generate the list of options for the user: Graphical User Interface(14/60) Uicontrol Objects Press this button in the ‘String’ field And this window will appear
Graphical User Interface(15/60) Uicontrol Objects To generate the list of options for the user: String ☒ Option 1 Option 2 Type in the options,each Option 3 separated by 'Enter' >>K=get(hObject,'value'); OK Cancel value'will indicate the index of the choice made Example:If the 2nd choice is @日济大学 AW made,then value'=2. TONGJI UNIVERSITY
To generate the list of options for the user: >>K=get(hObject,'value'); Graphical User Interface(15/60) Uicontrol Objects Type in the options, each separated by ‘Enter’ ‘value’ will indicate the index of the choice made. Example: If the 2nd choice is made, then ‘value’=2