How to set "word wrap" for cells in a uitable?

조회 수: 9 (최근 30일)
Darin McCoy
Darin McCoy 2012년 8월 29일
편집: Walter Roberson 2017년 6월 13일
Hi,
I'm trying to figure out how to set "word wrap" to be true for a uitable on a particular cell. I have access to the underlying java object (thanks to Yair Altman's findjobj function) and have been able to figure out how to set the height of the uitable cell using the java object, but am not sure how to get the cells to word wrap.
Any ideas on how to do that??
Clarification on what I mean when I say word wrap http://en.wikipedia.org/wiki/Word_wrap
  댓글 수: 1
Sinh Le
Sinh Le 2017년 6월 13일
편집: Walter Roberson 2017년 6월 13일
can u give an example of how to set the height of the uitable cell using the java object.
I tried this, but it did not work
import com.jidesoft.grid.*
jscroll = findjobj(table_4);
jtable = jscroll.getViewport.getView;
jtable.setRowHeight(11,30)

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

채택된 답변

Darin McCoy
Darin McCoy 2012년 8월 31일
Actually - turns out.....if you add HTML tags into your UITABLE - it will do word wrap automatically. Fun times! :)
  댓글 수: 2
patrick
patrick 2014년 2월 24일
what do you mean by HTML tags? do you have a sample code?
Walter Roberson
Walter Roberson 2014년 2월 24일
mywords = {'<HTML>This is a longer phrase that should wrap'; 'But this one which does not have the tag, should not wrap' };
uicontrol('Data', mywords)

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by