去添加,但你也可以直接用ListBox1.Items.LoadFromFile 方法来加载。他里面是以回车换行来分列。
也可以用ListBox1.Items.SaveToFile 方法直接保存成文件。
opendalog和savedialog的使用就不用多说了吧。
str=get(handles.listbox,'String');
inform{length(inform)+1}=Lstring;
set(handles.listbox,'String', inform);
在初始化的时候 inform={};定义inform为全局变量