Help and Support - GUIDE
Ältere Kommentare anzeigen
I have two pop-up menus (popupmenu1 and popupmenu2) each of them contains three strings, namely; “red”, “blue” and “green”; one pushbutton (pushbutton1); and one edittext (edittext1) placed on a figure (figure1).
If I press the pushbutton1, I need It to display the name of the new (resultant) colour formed in the edittext1, as a result of mixing (combining) the selected colour from popupmenu1 with the selected colour from popupmenu2.
The desired outputs are:
red + green = yellow (that is, selection of “red” from popupmenu1 and selection of “green” from popupmenu2 will display “yellow” in the edittext1, when the pushbutton1 is pressed).
Similarly:
red + blue = magenta (that is, selection of “red” from popupmenu1 and selection of “blue” from popupmenu2 will display “magenta” in the edittext1, when the pushbutton1 is pressed).
blue + green = cyan (that is, selection of “blue” from popupmenu1 and selection of “green” from popupmenu2 will display “cyan” in the edittext1, when the pushbutton1 is pressed).
The Callback needs to be implemented using nested If-elseif-else-end or the Switch statements to run.
Many thanks.
3 Kommentare
Steven Lord
am 4 Jan. 2021
Show us what you've written to try to implement the callback and explain why it doesn't do what you want and we may be able to offer some help.
Gbola
am 4 Jan. 2021
Steven Lord
am 4 Jan. 2021
Can you show us the full and exact text of the error message you receive? Show us all the text displayed in red and all the text displayed in orange when you try pushing the button.
Antworten (0)
Kategorien
Mehr zu Historical Contests finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!