How can I remove the Default selection in Listbox GUI?
조회 수: 6 (최근 30일)
이전 댓글 표시
Vinayak Appasaheb Bhatte
2018년 7월 18일
댓글: Vinayak Appasaheb Bhatte
2018년 7월 20일
I always see the top option in the listbox is default selected. How to remove this default selection?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192126/image.png)
Please help me. I checked the property inspector but couldn't find any solution. Thanks!
댓글 수: 0
채택된 답변
Adam Danz
2018년 7월 20일
편집: Adam Danz
2018년 7월 20일
If you'd rather have the 2nd one as default set the 'Value' property to 2.
If you want there to be no default, set the 'Value' property to an empty matrix and set the 'Max' and 'Min' properties to satisfy the following condition:
Max - Min > 1
댓글 수: 10
Adam Danz
2018년 7월 20일
You need to set that value either 1) when you are creating the listbox (as in my example) or 2) in the properties menu if you're using GUIDE.
You can also change the 'value' setting any time by using the handle to the listbox.
either
lb.Value = [];
or
set(lb, 'Value', [])
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!