Hide Label Text in App Designer

62 views (last 30 days)
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!

Accepted Answer

Subhadeep Koley
Subhadeep Koley on 29 Oct 2019
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.

More Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!