Matlab Listbox GUI No Selection
古いコメントを表示
I asked previously about setting the listbox properties so that when a list of files is loaded, the first one is not selected. I was told there was no way around that, which basically concluded as well. However, after chance, I determined that if I clicked in the empty box, then loaded the file names in the box, none of them would be selected. Is there anyway to "fake" a mouse click? It only happens if I click, or double click inside the listbox. I was trying something along the lines of:
set(handles.figure1,'SelectionType','open')
I tried that inside of (files is the listbox tag-this function executes on selection change in filebox:
function files_Callback(hObject, eventdata, handles)
Any hope with this?
採用された回答
その他の回答 (2 件)
Jeffery Devereux
2019 年 5 月 13 日
2 投票
Try this:
set(app.ListBox, 'Value', { })
1 件のコメント
Amanda Figueroa
2019 年 6 月 4 日
This one worked for me. Thanks!
Walter Roberson
2013 年 1 月 25 日
R2012a on OS-X Lion, I do not get that behavior. If I create a uicontrol style listbox, at the command line, then click in it, and then set() its String, I get
Warning: single-selection listbox control requires a scalar Value
Control will not be rendered until all of its parameter values are valid
2 件のコメント
Walter Roberson
2013 年 1 月 25 日
Ah, just a thought; this is only a problem if multi-select is not on. Perhaps you could take advantage of that?
Jared
2013 年 1 月 25 日
カテゴリ
ヘルプ センター および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!