multiscroll

Link multiple scrolling listboxes for scrolling and selection.

이 제출물을 팔로우합니다

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

인용 양식

Brett Shoelson (2026). multiscroll (https://kr.mathworks.com/matlabcentral/fileexchange/7535-multiscroll), MATLAB Central File Exchange. 검색 날짜: .

카테고리

Help CenterMATLAB Answers에서 Characters and Strings에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.0.0.0

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