No BSD License  

Highlights from
Simultaneous scrolling of listboxes

from Simultaneous scrolling of listboxes by prakash c
common slider for multiple listboxes

slider_forall_Callback(hObject, eventdata, handles)
function slider_forall_Callback(hObject, eventdata, handles)

% Create a GUI with XX listboxes and a slider..... and paste the following
% code in the callback of silder
% hObject    handle to slider_forall (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
 
% Set all the listboxes to the slider position


	
max_str = size(get(handles.listbox1,'String'),1);
set(handles.slider1,'Max',max_str);
pos = get(handles.slider1,'Value');
if ceil(pos)==max_str
    pos = max_str-1;
end
set(handles.listbox1,'Value',max_str-ceil(pos));
set(handles.listbox2,'Value',max_str-ceil(pos));
set(handles.listbox3,'Value',max_str-ceil(pos));
set(handles.listbox4,'Value',max_str-ceil(pos));
set(handles.listbox5,'Value',max_str-ceil(pos));
set(handles.listbox6,'Value',max_str-ceil(pos));

Contact us at files@mathworks.com