How to add/display Hyperlink of folder/file in the App Designer?

조회 수: 3 (최근 30일)
Gili Attias
Gili Attias 2019년 4월 5일
답변: Jayanti 2024년 12월 18일
I'm building app in App Designer. i want to display/add Hyperlink to a folder or specific file from my PC.
I look and found something that works in standard matlab. when i tried to display it in my app, i see only the text itself and not link.
see code:
folder = uigetdir();
disp(['','<a href = "matlab: [s,r] = system(''explorer ',folder,' &'');">',folder,'</a>','']);
this code in the command line, shows hyper link (see picture 1.jpg)1.jpg
but in my app, it shows as text (see picture 2.jpg)
2.jpg
can someone show me how to add in the app designer hyperlink?
the next step will be to know how to connect the hyperlink to an image...
Best Regards

답변 (1개)

Jayanti
Jayanti 2024년 12월 18일
Hi Gili,
To add hyperlink, you can use “web” function.
web(url)
This will open the page specified by url in a web browser. 
And for release MATLAB R2021a or later, uihyperlink” function can be used alternatively.
fig = uifigure;
hlink = uihyperlink(fig);
hlink.Text = " https://www.mathworks.com/";
hlink.URL = "https://www.mathworks.com/";
The above code will create a hyperlink component.
Please refer to below documentation links on “web” and “uihyperlink” for your reference.
Hope this is useful!

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by