Underline Text in Gui

조회 수: 10 (최근 30일)
nsbd
nsbd 2012년 2월 6일
댓글: Ralph 2020년 10월 28일
Hi All
N.Class = uicontrol('unit','pix',...
'style','text',...
'position',[0 405 340 30],...
'string','Hello',...
'horizon','center',...
'fontwei','normal',... ****underline ???
'FontName','Verdana',...
'backg',[0 0 0],...
'fontsize',8);
How do I ?
Thnks.

답변 (2개)

Jan
Jan 2012년 2월 6일
See Yair's suggestion about customizing buttons.
H = uicontrol('Style', 'PushButton', ...
'String', '<u>Underline</u>');
  댓글 수: 1
Ralph
Ralph 2020년 10월 28일
For anyone reading this in 2020 (or perhaps other versions):
You need to include the <html> tags in the string for this mechanism to work. So its:
H.String = '<html><u>control label</u></html>';

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


Sean de Wolski
Sean de Wolski 2012년 2월 6일
text(3,10,'\underline{Hello World}','interp','latex')
axis([0 20 0 20])
I can't seem to find a way to to this for a uicontrol string, though I'm sure there is a way.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by