Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

how to restore deleted items from listbox

Asked by Elysi Cochin on 31 Jan 2013

i did the coding in the following link to create a listbox and display names of images from a particular folder.... on selecting the name from the listbox that image gets displayed in the axes.....

http://www.mathworks.ch/matlabcentral/answers/27183-how-to-insert-elements-in-listbox

now i added two buttons, one named "DELETE" and the other named "RESTORE".....

in the DELETE button when i select a particular item from listbox that name gets deleted from the listbox and the corresponding image gets deleted from the folder....

on click of the RESTORE button all the delete images should get displayed in a figure file and added back to the folder.....

please can u help me do this option.....

i tried, its working when only one image is deleted..... if i delete more than one item, only the last deleted item is getting restored..... can u help me sort it out.....

1 Comment

Azzi Abdelmalek on 31 Jan 2013

Can you post your code?

Elysi Cochin

Tags

Products

No products are associated with this question.

2 Answers

Answer by Image Analyst on 31 Jan 2013
Accepted answer

Restore does nothing whatsoever to put anything in the listbox. You need to call some function like LoadListBox(handles) that you create which will use the filename pattern to create a cell array of strings and then use set() to send that cell array to your listbox control.

1 Comment

Elysi Cochin on 1 Feb 2013

sir what about to delete more than one item and restore it into the folder..... can u please show me that line..... please do reply sir....

Image Analyst
Answer by Walter Roberson on 4 Feb 2013

1 Comment

Walter Roberson on 4 Feb 2013

Those questions are still open. Edit them or post more to them instead of opening a new Question.

Walter Roberson

Contact us