Why am I unable to see the titles of my UICONTROL objects in MATLAB 7.0.1 (R14SP1)?

조회 수: 4 (최근 30일)
When using UICONTROL, UIBUTTONGROUP, and UIPANEL, I set the "title" property of the function but upon execution I do not see my title. Below is an example of the code I use:
set(0,'defaultUiControlUnits', 'characters');
fig=figure('handlevisibility','callback',...
'resize','off',...
'toolbar','none',...
'name','Optimizer Options',...
'nextplot','replace',...
'Numbertitle','off',...
'menubar','none');
leftPanel=uibuttongroup('Title','Choose Optimization Type',...
'parent',fig,...
'bordertype','etchedin',...
'selectionChangeFcn',@enableReview)

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
We have verified that there is a bug in MATLAB 7.0.1 (R14) in the way that "defaultUiControlUnits" are set with the SET function.
To work around this issue, you must explicitly set the 'Units' property for each UICONTROL. Do this by inserting "'units','characters'" as arguments to the UICONTROL function as shown in one of the examples below. The same workaround holds for UIPANEL and UIBUTTONGROUP.
As an example, do not set the 'Units' property with:
set(0, 'defaultUiControlUnits','characters');
If you have already issued the above command you need to first reset this property. To reset the property to the original value use the following:
set(0,'defaultUiControlUnits', 'pixels');
Set the 'Units' property of the control with either
uicontrol(units, characters);
or
h1 = uicontrol;
set(h1,'units', 'characters');

추가 답변 (0개)

카테고리

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

제품


릴리스

R14SP1

Community Treasure Hunt

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

Start Hunting!

Translated by