필터 지우기
필터 지우기

How to set a title with uicontrol

조회 수: 6 (최근 30일)
Stefan
Stefan 2014년 1월 20일
답변: Walter Roberson 2014년 1월 20일
Hi, I am using uicontrol to create a box and to display some value say 5 in the box
box = uicontrol('Style', 'text','Units', 'norm', 'Position', [0.8 0.8 0.05 0.05]);
x=5;
set(box,'string', sprintf('%f', x));
Can someone explain how to set a title to it.
thanks.

채택된 답변

Walter Roberson
Walter Roberson 2014년 1월 20일
There is no way to put a title in a uicontrol(). You can change the content you put in, though.
box_title = 'Probability cutoff:';
box = uicontrol('Style', 'text','Units', 'norm', 'Position', [0.8 0.8 0.05 0.05]);
x=5;
set(box,'string', sprintf('%s %f', box_title, x));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by