Is there a way to add static text in app designer?

22 ビュー (過去 30 日間)
Matt J
Matt J 2017 年 10 月 5 日
コメント済み: Austin Adam 2020 年 1 月 16 日
I have a lot of experience with GUIDE, but am now trying appdesigner for the first time. Is there anything comparable to GUIDE's static text objects that can be placed for additional labelling on the app designer canvas?
  2 件のコメント
Rik
Rik 2017 年 10 月 5 日
uilabel should do that but someone has had some trouble with it lately.
Matt J
Matt J 2017 年 10 月 6 日
編集済み: Matt J 2017 年 10 月 6 日
Thanks, but then as far as you know, there is no way to do it from within the App Designer?

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

採用された回答

Cam Salzberger
Cam Salzberger 2017 年 10 月 6 日
編集済み: Cam Salzberger 2017 年 10 月 6 日
Hello Matt,
Rik is correct that uilabel is the way to go. You can create the label manually during app creation:
Or you can create it programmatically in one of the callbacks. For example, I added a "startupFcn" callback, and put this code in:
uilabel(app.UIFigure, ...
'Text', 'my programmatically created label', ...
'Position', [100 100 250 30])
I am not sure Andre (on the other question) was experiencing issues, as it seemed to work fine for me. If you run into any issues, can you provide details about behavior and error message?
-Cam
  2 件のコメント
Matt J
Matt J 2017 年 10 月 6 日
編集済み: Matt J 2017 年 10 月 6 日
Hmmm. So it was staring me right in the face. Thanks, Cam!
Austin Adam
Austin Adam 2020 年 1 月 16 日
Hi i Know this is a bit late, but I was wondering with your programatically added in Label, can you change the text of it while the script is running? I am trying to show multiple updating lines of code in my app (sort of like the command window where lines come one after another but don't disappear). Is this possible with the Label? Or is there a better way to do it? The ony text related components I see are for user input...

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeText Data Preparation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by