I want to add a push button or a clickable link into a cell of table

조회 수: 3 (최근 30일)
jamhoo Lakhani
jamhoo Lakhani 2012년 5월 9일
댓글: Daniel Liberman 2020년 5월 20일
I want to add a push button or a clickable link into a cell of table,.. How can I do this??
I am using MATLAB GUI Window...
Please anyone help.

답변 (1개)

Oleg Komarov
Oleg Komarov 2012년 5월 9일
You can use HTML to format a string in a uitable, however the links will not be clickable.
You have to code a 'ButtonDownFcn' which has to parse the string and check if it's an HTML link, then open the link, format the link to violet (optional).
To get you started:
f = figure('Position',[200 200 400 150]);
link = '<http://www.mathworks.com/matlabcentral/answers/37852 My thread>';
t = uitable('Parent',f,'Data',{link},'ColumnName',{'Col1'},...
'ColumnFormat',{'char'},'Position',[20 20 360 100]);
  댓글 수: 1
Daniel Liberman
Daniel Liberman 2020년 5월 20일
Hi,
What if insted of an html I wand to create a list of hyperlinks to pdf/docx files?

댓글을 달려면 로그인하십시오.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by