if strcmp(t.System{n},"MIM-23A HAWK")
cla(app.UIAxes)
imshow("MIM_23A_HAWK.jpg","Parent",app.UIAxes)
uilabel(app.UIFigure,"Text","Raytheon tarafından geliştirilen sistem, orta menzil hava savunma sistemlerinin en etkililerindendir. Orta menzil hava savunma sistemi olmasına rağmen alçak irtifa hedefleri için uyarlanmıştır. Açık adı 'Homing Allthe way to Kill' dir. Standart lançerinden üç füze taşımaktadır. Improved (Geliştirilmiş)-HAWK`ın motor perfomansı artırılmış, elektronik harbe karşı korunması da en üst düzeye çıkarılmıştır. Azami menzil 35 km ve azami irtifası ise 18 km`dir.","Position",[531 17 368 279],"Visible","on")
textwrap(app.Label,app.Label.Text,20)
end
I have a text in label but it is too long, it does not show fully in label area. I tried to use textwrap command but it does not work. How can I do it? Thank you.

댓글 수: 3

cr
cr 2022년 5월 12일
As far as I recall, the text wraps automatically if the height of the label is large enough to allow multiline display.
Ali Deniz
Ali Deniz 2022년 5월 12일
It doesn't. Looks like the bottom right.
-Ali
textwrap(app.Label,app.Label.Text,20)
Also this line gives an error.

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

 채택된 답변

Ali Deniz
Ali Deniz 2022년 5월 12일
편집: Ali Deniz 2022년 5월 12일

0 개 추천

I solved my own question. I'm sharing it to help those who have similar problem.
MsgString = {'Raytheon tarafından geliştirilen sistem, orta menzil hava savunma sistemlerinin en etkililerindendir. Orta menzil hava savunma sistemi olmasına rağmen alçak irtifa hedefleri için uyarlanmıştır. Açık adı "Homing Allthe way to Kill" dir. Standart lançerinden üç füze taşımaktadır. Improved (Geliştirilmiş)-HAWK`ın motor perfomansı artırılmış, elektronik harbe karşı korunması da en üst düzeye çıkarılmıştır. Azami menzil 35 km ve azami irtifası ise 18 km`dir.'};
WrapString=textwrap(MsgString, 45);
uilabel(app.UIFigure,"Text",WrapString,"Position",[531 17 368 279])

추가 답변 (1개)

Dwobble
Dwobble 2023년 3월 9일

0 개 추천

Here's a simple solution. Change "Label" below to match the component name of the label you wish to wrap text in App Designer Code View.
app.Label.WordWrap = 'on';

카테고리

도움말 센터File Exchange에서 Develop Apps Programmatically에 대해 자세히 알아보기

질문:

2022년 5월 11일

답변:

2023년 3월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by