MATLAB: Matlab Listbox GUI No Selection

gui

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?

Best Answer

I have trouble understanding your question. Isn't there one negation too many? However,
set( listbox_handle, 'Value', [] )
  • regarding "none selected" interactively I've failed an added the string "- none -" at the top of the list. Selecting that row triggers
set( listbox_handle, 'Value', [] )
.
With R2012a on Windows 7