Path: news.mathworks.com!not-for-mail
From: "Phil Goddard" <philgoddardNOSPAM@telus.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: gui problem
Date: Wed, 16 Apr 2008 17:05:04 +0000 (UTC)
Organization: Goddard Consulting
Lines: 27
Message-ID: <fu5bk0$hdc$1@fred.mathworks.com>
References: <fu0llq$iu6$1@fred.mathworks.com> <fu5a5l$mhj$1@fred.mathworks.com>
Reply-To: "Phil Goddard" <philgoddardNOSPAM@telus.net>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1208365504 17836 172.30.248.37 (16 Apr 2008 17:05:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 16 Apr 2008 17:05:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 26433
Xref: news.mathworks.com comp.soft-sys.matlab:463370



You don't want these two lines
> guidata(hObject, handles);
> guidata(hObject, timeplot5);

The second line is overwriting (not appending to) the first 
line, and hence the handles structure is being lost.
Rather you want to add a field to the handles structure 
then store the new structure, i.e.

handles.timeplot5 = timeplot5;
guidata(hObject,handles);

Then within the listbox1_Callback you want to get rid of 
the following line
>     timeplot5 = guidata(hObject);

and change the next line
>     set(handles.listbox1,'String',timeplot5)
to
set(handles.listbox1,'String',handles.timeplot5)

In this way the info stored in the handles.timeplot5 field 
(assuming they are strings) should display in to the 
listbox.

Phil.