Changing the right panel gui in every choices in the left panel
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi! So i am very new to MATLAB especially in GUIs, so what i have here is the design for my program,![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/573087/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/573087/image.png)
So, i wanted to change the gui on the right panel every time i choose something from the left panel upon clicking 'Start Program', however it is my first time doing the gui which makes it difficult. I tried search for links, but couldn't find anything related to this. can someone help me?
댓글 수: 0
채택된 답변
Image Analyst
2021년 4월 5일
In the callback function for the button, you need to put code to read the selected index in the listbox and do something with that knowledge. Something like
selectedIndex = app.listbox1.Value;
switch selectedIndex
case 1
% Display solid block
case 2
% Display hollow block
case 3
% Display circle
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!