MATLAB Answers

Photo and Text with Dropdown Menu

7 views (last 30 days)
Kaitlyn Roling
Kaitlyn Roling on 1 Apr 2019
Commented: Kevin Phung on 1 Apr 2019
Hi all-
I created a drop down box with several options. Above it, I would like to put a line of text that says "Please choose an option from below." Lastly, I am hoping to put an image in this same figure.
Is that possible? I have been doing a lot of research to try and make it happen, but I have come up short.
Any assistance would be great!


Sign in to comment.

Answers (1)

Kevin Phung
Kevin Phung on 1 Apr 2019
use uicontrol to create a text box:
and imshow to create your image:
txt= uicontrol('Style','text','String','Please choose an option from below.',...
'Position', [x y width height])


Walter Roberson
Walter Roberson on 1 Apr 2019
Another approach is that you can use a uipanel() with the 'title' parameter, probably together with the FontSize and TitlePosition parameters.
Kevin Phung
Kevin Phung on 1 Apr 2019
^ yes, that would be much cleaner!

Sign in to comment.

Sign in to answer this question.


Translated by