Hide Label Text in App Designer
50 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
采纳的回答
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)
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!