Hyperlink in App Designer

I am designining an App in the enviroment App Designer. I wonder if it is possible to insert a hypertext link in my App, so that the user can open an existing Web Page. Thank-you

3 Comments

How about put it in your callback for you button?
%Call back button function
webpage('http://www.yahoo.com') %MATLAB Browser
%or
dos('explorer http://www.yahoo.com'); %Explorer
Thank-you so much!
Can the same thing done for a PDF/doc file?

Sign in to comment.

 Accepted Answer

Kevin Chng
Kevin Chng on 12 Oct 2018
Edited: Kevin Chng on 12 Oct 2018
Put code in callback function
%Call back button function
webpage('http://www.yahoo.com') %MATLAB Browser
%or
dos('explorer http://www.yahoo.com'); %Explorer

4 Comments

I have a text box including additional information about the product and the developers, in which I need to add a couple hyperlinks. I use label as text box, and to the best of my knowledge, "label objects do not have callback properties". So, how can I add code in callback function?
Use button instead. Are you using App Designer?
I tried this on app designer:
Undefined function 'webpage' for input arguments of type 'char'.
The correct function name is web but if you're using MATLAB R2021a or later, see the solution in my answer that does not rely on developing a uibutton.

Sign in to comment.

More Answers (1)

Adam Danz
Adam Danz on 10 May 2021
For Matlab R2021a or later, use the uihyperlink function or the UI hyperlink component in App Designer or a uifigure to add and configure a clickable link ( release notes ).
The hyperlink can be assigned to a figure, panel object, tab object, ButtonGroup, or GridLayout object when created in a uifigure.
See configurable properties.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products

Release

R2018a

Community Treasure Hunt

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

Start Hunting!