multiscroll

Link multiple scrolling listboxes for scrolling and selection.

You are now following this Submission

FUNCTION MULTISCROLL(varargin)

Automates the linking of multiple listboxes for simultaneous scrolling and selection.

Enter a comma-delimited list of handles to scrolling listboxes. Multiscroll will link them so that they scroll and are highlighted together. (All lists must have equal-lengthed strings.)

Multiple groupings are supported.

Note that this function uses timer objects and so requires ML R14.

Example:

tmp = dir;
a = uicontrol('style','listbox',...
'string',strvcat(a(:).name),...
'pos',[10 100 150 100]);
b = uicontrol('style','listbox',...
'string',strvcat(a(:).date),...
'pos',[140 100 150 100]);
c = uicontrol('style','listbox',...
'string',num2str([a(:).bytes]'),...
'pos',[270 100 150 100]);
d = uicontrol('style','listbox',...
'string',num2str([a(:).isdir]'),...
'pos',[400 100 150 100]);
multiscroll(a,b,c,d)

Example using multiple timers

a=uicontrol('style','listbox',...
'string',{1:100},...
'pos',[10 100 150 100]);
b=uicontrol('style','listbox',...
'string',{1:100},...
'pos',[140 100 150 100]);
c=uicontrol('style','listbox',...
'string',{1:100},...
'pos',[270 100 150 100]);
d=uicontrol('style','listbox',...
'string',{1:100},...
'pos',[400 100 150 100]);
multiscroll(a,c,d);
%(NOTE THE EXCLUSION OF b!!!)
a2=uicontrol('style','listbox',...
'string',{1:50},...
'pos',[10 250 150 100]);
b2=uicontrol('style','listbox',...
'string',{1:50},...
'pos',[140 250 150 100]);
c2=uicontrol('style','listbox',...
'string',{1:50},...
'pos',[270 250 150 100]);
d2=uicontrol('style','listbox',...
'string',{1:50},...
'pos',[400 250 150 100]);
multiscroll(a2,b2,c2,d2);

%(Note in the FEX image, all listboxes in the top cluster are linked, while only listboxes 1,3 and 4 in the bottom cluster are linked.)

Written by Brett Shoelson, PhD
shoelson@helix.nih.gov
4/26/05

Cite As

Brett Shoelson (2026). multiscroll (https://in.mathworks.com/matlabcentral/fileexchange/7535-multiscroll), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

Modifying example and screen shot to show better the functionality of the program.