MATLAB Answers

How to modify the text visibility in a Gui that created using App Designer

3 views (last 30 days)
balandong
balandong on 21 Jan 2020
Commented: Ajay Kumar on 22 Jan 2020
Dear Coder,
I have develop a gui using AppDeveloper.
In a separate main.m file, I would like to display the GUI and change the visibility of a Label. Say the component having name of app.Label.
If using GUIDE, I know the command to achieve this will be
set(handles.LabelTag,'Visible','off');
But having migrated to App Developer, the command is not working.
Some method in the net show that the code should be something like below, however, its is not working for my case.
app.Label.Visible = 'off'
Appreciate if someone can show which part i do wrong

  0 Comments

Sign in to comment.

Accepted Answer

Ajay Kumar
Ajay Kumar on 21 Jan 2020
Edited: Ajay Kumar on 21 Jan 2020
What is the exact name of the component? I would suggest you to rename it if its only Label.
For example, if you rename it to Component1EditField, then to change the visibility, you can use:
app.Component1EditFieldLabel.Visible = 'off';

  6 Comments

Show 3 older comments
Ajay Kumar
Ajay Kumar on 22 Jan 2020
Ok, this is a different context now.
Replace the whole main.m file with
x = GuiApp;
x.Component1EditFieldLabel.Visible = 'off';

Sign in to comment.

More Answers (0)

Sign in to answer this question.