![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244940/image.jpeg)
MATLAB App Designer: How can I hide few of my app components when i run the app?
조회 수: 73 (최근 30일)
이전 댓글 표시
I am trying to create an App where i want to hide some of the components intitially when I run the App. Could someone help me how to do it?
Your help would be highly appreciated. Thank you.
댓글 수: 0
채택된 답변
Kojiro Saito
2019년 10월 25일
편집: Kojiro Saito
2019년 10월 25일
For example, from Component Browser, select app.UIFigure and add StartupFcn callback.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244940/image.jpeg)
Then in Code View, you can add startupFcn as the follows. You can make components invisible by changing Visible property of components.
function startupFcn(app)
app.Button.Visible = 'off'; % For button
app.UIAxes.Visible = 'off'; % For axes
end
Please replace app.Button or app.UIAxes to your existing components names.
And if you want to make them visible, change Visible properties to 'on'.
app.Button.Visible = 'on';
app.UIAxes.Visible = 'on';
댓글 수: 4
Parth Dethaliya
2020년 5월 13일
How can perform the same operation for a group? I mean i created group in design view now i wants to change visibility of the whole group!!
Eddie Burdak
2021년 1월 14일
if the group is in a container (eg Panel) - just turn the containers visibility on and off
추가 답변 (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!