Path: news.mathworks.com!not-for-mail
From: "Adam Bright" <abc_services_2000@yahoo.co.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: gui problem
Date: Wed, 16 Apr 2008 16:40:21 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 48
Message-ID: <fu5a5l$mhj$1@fred.mathworks.com>
References: <fu0llq$iu6$1@fred.mathworks.com>
Reply-To: "Adam Bright" <abc_services_2000@yahoo.co.uk>
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 1208364021 23091 172.30.248.37 (16 Apr 2008 16:40:21 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 16 Apr 2008 16:40:21 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1142958
Xref: news.mathworks.com comp.soft-sys.matlab:463360


thanks for your time,

i first intially have used the gui data function just after
the plot information.

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

immediately after this is the following:

% --- Executes on selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)
% hObject    handle to listbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of
MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns listbox1
contents as cell array
%        contents{get(hObject,'Value')} returns selected
item from listbox1
    timeplot5 = guidata(hObject);
    set(handles.listbox1,'String',timeplot5)
    guidata(hObject, handles);


% --- Executes during object creation, after setting all
properties.
function listbox1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of
MATLAB
% handles    empty - handles not created until after all
CreateFcns called

% Hint: listbox controls usually have a white background on
Windows.
%       See ISPC and COMPUTER.

    start_date = get(handles.listbox1,'Value')
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end
guidata(hObject, handles);

i've emailed you the full code if you think it will help.
This is much appreciated.