Change label color of the "Edit field (Numeric) element in App Designer

16 ビュー (過去 30 日間)
Veronica Taurino
Veronica Taurino 2021 年 2 月 17 日
編集済み: Veronica Taurino 2021 年 2 月 18 日
Hi!
I am creating a GUI with the APP DESIGN.
I would like to change the color of the Label associated to the "Edif field (Numeric)" element in the picture below. It does not appear in the ''COMPONENT BROWSER'' in the right panel. Is it possible? I can change the color of the text inside the field (in this case the number 15) but I need to change the color of the label. I know I can manually change it, but I neet it to change automatically when a certain action is completed.
Thank you in advance

採用された回答

Cris LaPierre
Cris LaPierre 2021 年 2 月 17 日
編集済み: Cris LaPierre 2021 年 2 月 17 日
The label is part of the edit field. Clicking on the label will open the properties in the inspector. Under Font and Color, set FontColor. Be sure to click the label and not the edit field.
  5 件のコメント
Veronica Taurino
Veronica Taurino 2021 年 2 月 17 日
編集済み: Veronica Taurino 2021 年 2 月 18 日
I could not make it work on my code. It works fine after creating a new 'EditField', as you said:
app.EditFieldLabel.FontColor = 'c'
but on mine it did not and I get the following message:
Unrecognized method, property, or field 'MIyNameEditFieldLabel' for class 'MYProjectName'.
I solved it just creating again my 'EditField', because the old one had no 'label' field at all to change! I didn't figure out the reason, maybe I deleted something without realizing it.
Thank you for your suggestion, it really helped!
Bye
Cris LaPierre
Cris LaPierre 2021 年 2 月 17 日
This error suggests that you are not using the correct name. Use tab completion in app designer to make sure you are using the correct name.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by