In APP Designer, how to add a new uicontrol and show it on the original figure window

15 ビュー (過去 30 日間)
[ h(i*7+j)=uicontrol(app.UIF,'Style','text','Units','normalized',...
'Position',[0.45+0.06*j 0.65-0.08*i 0.06 0.08],'FontSize',13,...
'FontWeight','bold','BackgroundColor',[0.6 0.8 0.1]); ]
this Textarea wili show in a new figure but not show in the original FIG

採用された回答

Reshma Nerella
Reshma Nerella 2021 年 11 月 7 日
Hi,
The reason the text area is displayed in a new figure is that the uicontrol function is not supported in App Designer. There is a component named TextArea which can be used in App Designer to create a text box.
For more information, refer to the documentation pages of text area component.
  1. https://www.mathworks.com/help/matlab/ref/uitextarea.html
  2. https://www.mathworks.com/help/matlab/ref/matlab.ui.control.textarea-properties.html
Hope this helps!
  1 件のコメント
song fu
song fu 2021 年 11 月 10 日
Thanks very much. Using " fb=uitextarea(app.UIFigure) ", I have created the textareas by loop
" fb=uitextarea(app.UIFigure);
fb.Position=[327+32*j 335-24*i 29 20];
fb.FontSize=10;
fb.Value=num2str(a(i,j));
fb.FontWeight='bold';
fb.BackgroundColor=[0.6 0.8 0.1];"

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by