How to link to a web address or a local PDF file from App designer?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Farzam Malmir
am 6 Feb. 2019
Bearbeitet: Pranjal Priyadarshi
am 26 Feb. 2019
I am adding a small help section to my app including some additional information about the product and how to use it. To do so, I need to learn:
1 - How to assign a hyperlink to text so that the assigned web address is opened in a browser?
2 - How to link to a local PDF file so that it is opened in a PDF reader once the user clicks on it? Let's assume we have a help file in PDF format, in the same directory of the application.
Thanks in advance.
0 Kommentare
Akzeptierte Antwort
Pranjal Priyadarshi
am 18 Feb. 2019
Bearbeitet: Pranjal Priyadarshi
am 18 Feb. 2019
In order to assign a hyperlink to a component so that the assigned web address is opened in browser, we can add callback functions with the component being used in the AppDesigner in the manner shown below:
function ClickforHyperLinkButtonPushed(app, event)
%Anyone of the below commands can be used.
dos('explorer http://www.facebook.com'); % This will open the mentioned URL in new tab in Internet Explorer.
web('http://www.facebook.com'); % This will open the URL in the help browser of MATLAB.
end
This callback can be used for opening a file
function ClickForPDFButtonPushed(app, event)
dos('explorer file:/// FILE_PATH');
end
2 Kommentare
Pranjal Priyadarshi
am 22 Feb. 2019
Bearbeitet: Pranjal Priyadarshi
am 26 Feb. 2019
To answer the first question: I don't think anything of that sort is available in app designer.
To answer the second question: For sending email using the default email manager you can use the following callback. [For this to work you should have email manager installed on your windows machine (e.g. Outlook on Windows machine )]
email = 'myaddress@provider.ext';
url = ['mailto:',email];
web(url,'-browser')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!