Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.03.20;
Скачать: CL | DM;

Вниз

Указатели   Найти похожие ветки 

 
webpauk   (2005-03-04 19:01) [0]

Есть fArray array of tcontrols;

Tcontrol - любой объект
как сделать указатель Items на farray, чтобы в нем показывались только (Tcontrol as TmainMenu), например


 
clickmaker ©   (2005-03-04 19:06) [1]


> webpauk   (04.03.05 19:01)

у массивов нет встроенных механизмов фильтрации. Руками


 
Defunct ©   (2005-03-04 19:11) [2]

TControlList = class(TControl)
private
  fControls : Array of TControl;
 
  procedure SetItem(const Index: integer; AControl: TControl);
  function  GetItem(const Index: integer);

public
  property Items[Index : integer]:TControl read GetItem write SetItem;
 
end;

var
 Controls : TControlList;

begin
  Controls := TControlList.Create;
  ...

Вот, и в функции GetItem выбирать только те Control"ы которые (is TMainMenu)



Страницы: 1 вся ветка

Текущий архив: 2005.03.20;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.084 c
14-1109698606
Nikolay(DW)
2005-03-01 20:36
2005.03.20
Поместить в орешник :)


6-1106049675
WandR
2005-01-18 15:01
2005.03.20
IdMappedPortUDP


9-1103914428
Макс
2004-12-24 21:53
2005.03.20
L3dt 2.2


1-1110189099
Checist [root]
2005-03-07 12:51
2005.03.20
Наседник TComboBox


3-1108749618
Urvin
2005-02-18 21:00
2005.03.20
Поймать отключение сервера