フィルターのクリア

Hide Label Text in App Designer

32 ビュー (過去 30 日間)
Jacopo Morosi
Jacopo Morosi 2019 年 10 月 24 日
コメント済み: Jacopo Morosi 2019 年 10 月 29 日
Hi All,
sorry if this might seem a stupid question.
I'm developing an app using App Designer. The user can enter several parameters, which can change according to the selected mode. My goal is to disable and hide all the edit fields releated to the parameters not needed in a specific mode. I'm able to fo that for the numeric fields, setting "Editable" and "Visible" properties to 'off'. E.g.:
app.Start.Editable = 'off';
app.Start.Visible = 'off';
This actually works, making the value uneditable and hiding the entire box. The only thing which I cannot hide is the label which is automatically created. Which is the correct way to reference that label? I tried (with no success) something like:
app.Start.Label = 'off'
or
app.Start.Tag = ''
Thanks very much for your help!

採用された回答

Subhadeep Koley
Subhadeep Koley 2019 年 10 月 29 日
Some components, such as edit fields and sliders, are grouped with a label when you drag them onto the canvas. These labels do not appear in the Component Browser by default, but you can add them to the list by right-clicking anywhere in the Component Browser and selecting Include component labels in Component Browser. (Refer to the image below)
hideLabel.png
After enabling this option you can refer those labels in the Code View to set their visibility to ‘off’ (Refer to the code below)
app.EditFieldLabel.Visible = 'off';
However, if you do not want the component to have a label in the first place, you can exclude it by pressing and holding the Ctrl key as you drag the component onto to the canvas.
  1 件のコメント
Jacopo Morosi
Jacopo Morosi 2019 年 10 月 29 日
This solution works well...thanks a lot!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by